in reply to Escape the apostrophe in sed command in perl script

SatisfyMyStruggles:

It doesn't look like that's the line of code giving you the error, since the filename you gave doesn't match the pattern in the statement.

You may as well use perl instead of sed anyway. Printing lines between two strings in a file is as easy as:

while (<$FH>) { print if /log-passed/ .. /log-end/; }

...roboticus

When your only tool is a hammer, all problems look like your thumb.