Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sed help?

Name: Anonymous 2012-04-09 22:48

sup /prog/, I need your help for a bash script I'm making.
The last thing I need is a 3-step line.
>1. find the first instance of one less than an existing variable ($X - 1)
>2. search for the first instance of a string above that
>3. take the line of step 2 and save it as a variable

How could I do this using sed/grep?
Thanks.

Name: Anonymous 2012-04-09 23:43

This is impossible using sed or grep alone.  You might be able to hack together some abomination with awk and sh, but you'd probably be better off just using Perl.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List