[ale] Script output for file access.

Joseph A. Knapka jknapka at earthlink.net
Tue Jul 3 20:12:35 EDT 2001


Dan Mount wrote:
> 
> I've got a script that greps certain entries out of a log file. Is there a
> way to make this script act like a regular file? What I'd like is to have a
> log parser access the output of the script as a regular file, or do a 'less
> logfile' and see the output of the script. I know I can use stdin/stdout to
> the parser, but was wondering if the above was possible.
> 
> DM
> 
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.

You can create a FIFO. When the script runs, redirect its output
to the FIFO. Anything that reads from the FIFO will get any
unread output from the script. The FIFO continues to live
after its readers and writers die; basically it's a hunk
of pipe that anyone can dump input into one end of, and
anyone else can read the data from the other end whenever
they want.

man mkfifo

-- Joe Knapka
"You know how many remote castles there are along the gorges? You
 can't MOVE for remote castles!" -- Lu Tze re. Uberwald
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
* Evolution is an "unproven theory" in the same sense that gravity is. *
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list