> -----Original Message-----
> From: Rahul Garg [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 24, 2001 4:44 AM
> To: [EMAIL PROTECTED]
> Subject: Deleting the contents of file:Help
> 
> I want to search for a specific mailid in a file and if found 
> then delete that mailid from that file.

Do you want to delete lines containing the mailid? Or just delete the text
of the mailid?

This will delete lines (like grep -v):

   perl -ne 'print unless /blahblah/' infile >outfile

This will strip all occurences of the text, but leave the line:

   perl -pe 's/blahblah//g' infile >outfile

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to