Re: [OT:style]deleting a line with a particular string.

2001-06-29 Thread Michael Fowler
On Fri, Jun 29, 2001 at 10:21:31AM +1000, Sam Lander wrote: > 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: >1

RE: [OT:style]deleting a line with a particular string.

2001-06-29 Thread Peter Scott
At 10:21 AM 6/29/01 +1000, Sam Lander wrote: > >> 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.

RE: [OT:style]deleting a line with a particular string.

2001-06-29 Thread Sam Lander
>> 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 de

Re:[OT:style]deleting a line with a particular string.

2001-06-28 Thread Paul
--- Me <[EMAIL PROTECTED]> wrote: > > I have a file having 100 lines. > > I want to remove the lines, having a particular string, completely > > from the file. (notreplacing them with blank lines even) > > > > Is there a way in perl for doing this ? > > At a shell prompt / command line, enter: >