Scription Question on Output

amerar_at_iwc.net
Date: 11/14/05


Date: 14 Nov 2005 11:01:49 -0800

Hi,

I have a long shell script I wrote to automate some tasks. Some of the
lines in this script echo a response into a command, such as 'echo Y |
<program name>'.

All works fine. However, I've seen problems arise if the number of
responses piped into a command is different than what the command is
expecting. In fact, say the command needed 2 responses this time
around, and I only provided 1 on my 'echo' pipe.........

The script goes into an infinite loop printing error messages on the
screen. Is there any way to detect this, or capture what the script is
doing and abort gracefully, rather than having 1 million lines scroll
while it ignores my ctrl-c attempts?

Thanks.



Relevant Pages