|
pipes and bash scripts
All,
I am tying to get what is written to a log file into a MySQL database.
If I set up a named pipe and run the following:
/sbin/converter.pl < /var/log/syslog &
Where "syslog" is a named pipe, it (the pipe) fills up too quickly, and I get an error.
If I make the syslog a normal file, and do a:
tail -n 0 -f /var/log/syslog|/sbin/converter.pl &
It runs great, but when called from a bash script, it won't exit when the function that called it dies. For instance, if I call it while starting a service, when the service dies or stops, it still is active, even though the first one (above) does die properly. This is extremely frustrating, can someone help me get it so that I can get it to read the log properly AND it exits when it is supposed to?
-Pair
|