Newbie ? - Delete one and only one line 
Author Message
 Newbie ? - Delete one and only one line

I need to delete one and only one line from each
and every email meassage that has a mime attachment.

Message-ID:
<< this blank line has got to go! >>
MIME-Version:

I'm on perl4. It seems that you can to reg exp but only
a line at a time.

thanks
Dale
--
========================================================
Dale Phillips        - I opened a clam and found a perl

========================================================



Sat, 06 Mar 1999 03:00:00 GMT  
 Newbie ? - Delete one and only one line

Quote:

> I need to delete one and only one line from each
> and every email meassage that has a mime attachment.

> Message-ID:
> << this blank line has got to go! >>
> MIME-Version:

If you always want to delete the line after Message-ID, this might do the
trick. Good luck!

   perl -pi.bak -e 'scalar <> if /^Message-ID:/' filename

-- Tom Phoenix            http://www.teleport.com/~rootbeer/




Sat, 06 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. search for one line and print that line and the one after it

2. Deleting one line from a file

3. How to delete one line in perl ?

4. How to delete one field in each line ?

5. Tutorial for writing modules (newbie ones/ portable ones)

6. Q: How to delete several files in one operation (newbie)

7. combining every 3 lines in a given file into one line

8. combining every 3 lines in a given file into one line

9. cobol line seq. file - one very long line -

10. reading lines from one file and pulling matching lines in another

11. Multi-Line Record into One line

12. Two questions, one easy, one hard.

 

 
Powered by phpBB® Forum Software