I have a file formatted like this:

#error0
#   This indicates that there was no
#   error whatsoever.
#error0

#error1
#   You have specified no arguments,
#   so the program ran the 'PrintHelp'
#   subroutine and then died.
#error1

#error2
#   If you do not specify a type, then
#   there is no way for the script to
#   get a file for you!
#error2

#error11
#   Couldn't login into the FTP host at Goddard.
#error11

#error12
#   Couldn't set the transfer mode to binary.
#error12

I want to write code that searches for an error number, and then prints everything in between the two error number labels. So if I type something like:

>lzget -error=12

then the script should print:

>Couldn't set the transfer mode to binary.

I am not having any trouble getting a regexp that finds the right error codes - it's what to do afterward that perplexes me . . .

Jason Dusek


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to