> -----Original Message-----
> From: Me [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 27, 2001 5:30 AM
> To: COLLINEAU Franck FTRD/DMI/TAM; Perl (E-mail)
> Subject: Re: deleting lines
>
>
> > I would like too delete the 2nd, 3rd, 4, and 5 lines of a file. how
> > can i do ?
>
> Try this at a shell prompt:
>
> perl -ni.bak -e '$. =~ /[2-5]/ or print' FILENAME
Ouch! That will delete lines 12, 13, 14, 15, plus all lines between 20 and
59, 62, 63, 64, 65, 72, 73, 74, 75, ...
At least you had him create a .bak file!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]