Deutsch   English   Français   Italiano  
<0e5c2fc463ca61baeed61bb8340a9658@msgid.frell.theremailer.net>

View for Bookmarking (what is this?)
Look up another Usenet article

From: Fritz Wuehler <fritz@spamexpire-202407.rodent.frell.theremailer.net>
Subject: Re: How can I use sed to insert a character into a file?
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
References: <v6hc36@dont-email.me>
Message-ID: <0e5c2fc463ca61baeed61bb8340a9658@msgid.frell.theremailer.net>
Date: Tue, 09 Jul 2024 16:26:11 +0200
Newsgroups: comp.os.linux.misc
Path: ...!weretis.net!feeder9.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!alphared!sewer!news.dizum.net!not-for-mail
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 2001::1/128
Bytes: 1173
Lines: 15

Jon Danniken <nones...@nottodaynortomorroreither.org> [JD]:
JD> <type:color>000000</type:color>
JS> <type:color>FFFFFF</type:color>

JD> the tags are hex colors ... but need to begin with a pound sign (#)


# append a pound sign after the first instance of ">"
< file sed 's@>@&#@'


Or, if you are a fan of 'awk'

# replace the first instance of ">" with ">#" and print the line
< file awk '{sub(">",">#")}1'