in reply to Reading a file from any arbitrary place in the file.
Another approach, if the file is small enough, is to slurp into memory and split it, using your marker as the delimiter:perl -ne 'if($ok){print;}else{$ok=/^This is the temp line\.$/}' foo.tx +t
perl -n0777e 'print ((split(/^This is the temp line.\n/m, $_, 2))[-1]) +' foo.txt
|
|---|