kemparaju
November 7th, 2011, 03:57 PM
Hi,
How to terminate the command in shell script, which is expecting Ctrl+c to get terminate. For example my shell script is
cat /dev/input/event1 > event1.txt
cat /dev/input/event2 > event2.txt
cat /dev/input/event3 > event3.txt
but it is not executing 2nd command, because first command will be waiting for the input of Ctrl+c to get terminate. But I dont want to press Ctrl+c manually.
Is there any way to execute these 3 commands without manuall input.
Please help me out.
Thanks
Kemparaju
How to terminate the command in shell script, which is expecting Ctrl+c to get terminate. For example my shell script is
cat /dev/input/event1 > event1.txt
cat /dev/input/event2 > event2.txt
cat /dev/input/event3 > event3.txt
but it is not executing 2nd command, because first command will be waiting for the input of Ctrl+c to get terminate. But I dont want to press Ctrl+c manually.
Is there any way to execute these 3 commands without manuall input.
Please help me out.
Thanks
Kemparaju