sed : how to use delimiter
Hi,
i have a file like: it is for the format is ... now my problem is when i give this sed command : sed 's/for/sfor/g' it replaces "for" as well as "format" so how to delimit this so that the output should be: it is sfor the format is ... not it is sfor the sformat is ... |
try:
Code:
sed 's/\<for\>/sfor/g' |
Really good SED tutorial here:
http://www.grymoire.com/Unix/Sed.html Keep in mind that SED is literal---in your example, "for" does not mean the word "for"--it means those three letters in sequence. |
All times are GMT -5. The time now is 08:42 PM. |