Dolph
1
Hello
I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem.
Example:
cat file1.txt | sed -e '/</Header>/d' > file2.txt
This errors due to the forward slash before the Header text.
Thanks
Scott
2
Hi.
Yes. You can escape the slash:
sed '/<\/Header>/d' file1.txt > file2.txt
(and you don't need to use cat here)
frans
3
Or use alternate separators
cat file1.txt | sed -e '|</Header>|d' > file2.txt