709394
09-21-2004, 11:18 PM
How to replace the substitution command symbol using sed?
Example: Replace ` with +
In File.txt:
1st line with substitution command symbol `
2nd line with substitution command symbol `
In Out.txt
1st line with substitution command symbol +
2nd line with substitution command symbol +
thanx!
Forget it!
Found answer.
sed -e "s/\`/theReplaceChar/g" File.txt > Out.txt
Don't use SINGLE quote! It was my mistake.
Example: Replace ` with +
In File.txt:
1st line with substitution command symbol `
2nd line with substitution command symbol `
In Out.txt
1st line with substitution command symbol +
2nd line with substitution command symbol +
thanx!
Forget it!
Found answer.
sed -e "s/\`/theReplaceChar/g" File.txt > Out.txt
Don't use SINGLE quote! It was my mistake.