Running sed commands

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

Hi.

Yes. You can escape the slash:

sed '/<\/Header>/d' file1.txt > file2.txt

(and you don't need to use cat here)

Or use alternate separators

cat file1.txt | sed -e '|</Header>|d' > file2.txt

Sorted.

Thanks for that