[ale] Sed equivalent for vi command
Dow Hurst
dhurst at kennesaw.edu
Fri Dec 6 16:29:32 EST 2002
Thanks so much for the examples, specific and general. I really wanted
to script a solution for deleting specific groups of lines out of a
file. I wanted to make this a general solution for a manual procedure
everyone in our research group has had to do. This is the way to go.
It is nice to have help like this.
Dow
Fletch wrote:
>>>>>>"Dow" == Dow Hurst <dhurst at kennesaw.edu> writes:
>>>>>>
>>>>>>
>
> Dow> If in vi I issue: :23,23+20 d
>
>[...]
>
>Not sed, but:
>
>
>perl -lne 'print unless 23..43'
>
>
>Or more generically:
>
>
>perl -lne 'BEGIN{($s,$e)=(shift,shift);$e+=$s}print unless$.==$s..$.==$e' 23 20
>
>
>
>
--
__________________________________________________________
Dow Hurst Office: 770-499-3428
Systems Support Specialist Fax: 770-423-6744
1000 Chastain Rd., Bldg. 12
Chemistry Department SC428 Email:dhurst at kennesaw.edu
Kennesaw State University Dow.Hurst at mindspring.com
Kennesaw, GA 30144
*********************************
*Computational Chemistry is fun!*
*********************************
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list