>> At a shell prompt / command line, enter:
>> 
>>     perl -ne '/string/ or print' file
>> 
>> where string is the string and file is the file.
>
>I prefer 'print unless /string/'. 
>As if it matters. ;o] 

I wanted to do this just today. Although, I want to tidy up the resulting
line a bit by deleting everything before a colon, so I tried this:
   perl -ne "/string/ &&  print s/.*://" file
I was surprised that I got this:
   1111111111111111111111111111111111111111111 (one '1' for each match)
A bit of playing gave me:
   perl -ne "/Recipient/ &&  s/.*:// && print"
Which gave me what I wanted, but is rather unsatisfying (esp to the sedder
in me). 
What do other people do? Shouldn't DWIM come into play here?

Sam

Reply via email to