I am aware of several other questions related to this one such as: Sed Unknown Option to s; however I am not having that problem. I am trying to run:
sed -n '/Ce./,/EOF/ {s!^#!! d} p' more_tests_high.job
but I keep getting:
sed: -e expression #1, char 21: unknown option to `s'
I am trying to search more_test_high.job
for text between Ce
and EOF
, but remove any comment lines which start with #
. Yes, EOF
is a literal text in the file that I want to search for. I have tried using /
, !
, and _
as delimiters. I can run:
sed -n '/Ce./,/EOF/ p' more_tests_high.job
and see all the text that is between Ce
and EOF
, but how do I remove the commented lines that start with #
?