Re: deleting that maillist footer

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
$q means "quit if last line of file".
 

 Here is a similar, simpler way that I think works, even as a somewhat long one-liner:
 

 $ cat input.txt
Hello, Dan!!!
 ------------------------------------
Posted by: Sven Guckes <sven@...>
------------------------------------

 

 $ cat sed.txt
/^-----*$/ {N; /Posted by:/ {N; /------$/ d } }

 

 $ sed -f sed.txt input.txt
Hello, Dan!!!
 

 Daniel



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.