LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-03-2004, 09:59 PM   #1
twistedpair
Member
 
Registered: Jan 2004
Posts: 71

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash scripts hoffmanyew Programming 3 08-11-2005 01:27 AM
Need Help With Bash Scripts the_woelf Linux - Software 4 06-30-2004 09:09 AM
Bash Scripts Skute Programming 7 03-12-2004 10:17 AM
$? in Bash scripts clinton Linux - Newbie 4 02-20-2004 11:15 AM
Bash scripts? BajaNick Programming 3 07-05-2003 10:13 PM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration