Hi all,
I'm running Fedora8 on an AMD x64 have some iterating text in a flat file I'd like to change, but keep the iteration.
For example, parts of my file say "Ge1:1 then some text, Ge1:2 then some more text...Ge1:22...."
I'd like to replace "Ge1:n" with "<sub>n</sub>" - basically, I'm formatting something in HTML and want to put the number after the colon into superscript and lose the "Ge1:"
I'm reading a sed tutorial (see link below) and came up with the following:
sed s/Ge1\:\([0-9]*\)/\<sub\>\1\<\\/sub\>/ a.txt > b.txt
But it doesn't replace anything.
When I run: sed s/Ge1\:[0-9]*\ /\<sub\>\<\\/sub\>/ a.txt > b.txt it works fine, but I lose "n"
Does anyone know why the "\1" isn't recognizing the "\([0-9]*\)" ?
http://www.grymoire.com/Unix/Sed.html
Thanks, William