Groups | Search | Server Info | Login | Register
Groups > comp.os.linux.misc > #56859
| 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> (permalink) |
| Date | Tue, 09 Jul 2024 16:26:11 +0200 |
| Newsgroups | comp.os.linux.misc |
| Path | csiph.com!news.mixmin.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 |
| Xref | csiph.com comp.os.linux.misc:56859 |
Show key headers only | View raw
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'
Back to comp.os.linux.misc | Previous | Next | Find similar
Re: How can I use sed to insert a character into a file? Fritz Wuehler <fritz@spamexpire-202407.rodent.frell.theremailer.net> - 2024-07-09 16:26 +0200
csiph-web