Deutsch English Français Italiano |
<v6hc36$vv1m$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jon Danniken <nonesuch@nottodaynortomorroreither.org> Newsgroups: comp.os.linux.misc Subject: How can I use sed to insert a character into a file? Date: Mon, 8 Jul 2024 13:44:54 -0500 Organization: A noiseless patient Spider Lines: 15 Message-ID: <v6hc36$vv1m$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 08 Jul 2024 20:44:55 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8dff31a87a669269c6a237cff9733ad6"; logging-data="1047606"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Y21jRSwJ92WPCShG9ibi9nOYXuYfeT9k=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:jwryD8cmlVVpk2W2je0BBGxcQhI= Content-Language: en-US Bytes: 1487 I'm sure this is trivial to most here, but sed confounds me. I have an xml file with content following this format: <type:color>000000</type:color> <type:color>FFFFFF</type:color> The information within the tags are hex colors (many different colors), but they need to begin with a pound sign (#) to work in a particular application, ie: <type:color>#000000</type:color> <type:color>#FFFFFF</type:color> How can I use sed to append the pound symbol in this file? Using sed 4.8 BTW, thanks!