Hi,
I would like to start a program with logging from an sh script. I created two test scripts:
starter.sh:
producer.sh:
My problem is that when I start starter.sh it's process remains in the system and additional processes for producer.sh and logger are created.
If I do
instead of
then it is OK, I cannot see a process for starter.sh.
The original version should work with the pipe to logger. How could I make it work?
Thanks for any help!
I would like to start a program with logging from an sh script. I created two test scripts:
starter.sh:
Code:
#!/bin/sh
exec ./producer.sh | logger
Code:
#!/bin/sh
while :
do
echo "hello"
sleep 5
done
My problem is that when I start starter.sh it's process remains in the system and additional processes for producer.sh and logger are created.
If I do
Code:
exec ./producer.sh >> /var/log/messages
Code:
exec ./producer.sh | logger
The original version should work with the pipe to logger. How could I make it work?
Thanks for any help!