[ale] Sed

Chris Fowler ChrisF at computone.com
Tue Jan 16 13:40:57 EST 2001





If I have a text file that has the following statement:



Modes   1



I can use sed to change 1 to 2


sed "s/Modes  1/Modes  2" < /tmp/in > /tmp/out


What if I do not know if there is a 1 or a 2 or a 3.  How can I use sed to chenge the "Mode  X"  to Mode  1"?


Thanks,
Chris







More information about the Ale mailing list