Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: bash ?

tlug note from Jason Molenda <>
> I'm trying to write a bash script that strips the header from
> mail files before I print them 

So you're trying to remove all lines until the first empty line, right?
sed is the command you need.  Sed does all! :)

 cat foo | sed '1,/^$/d'

will do what you want, I think.  It still leaves a blank line at the
beginning of the output stream which seems inelegant to me, but it
becomes less aesthetic to deal with it so I leave that as an exercise. :)

a word from the sponsor will appear below
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.
Tel: 03-3351-5977   Fax: 03-3353-6096

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links