[Ilugc] Re : timeout in shell command

  • From: saikiranrgda@xxxxxxxxx (K. Sai Kiran)
  • Date: Tue Sep 11 06:31:54 2007

On Mon, 2007-09-10 at 09:33 -0700, Amit Dey wrote:

you have shown how to display a message if the process has not yet completed.

now can i display a message if the process has completed successfully. and 
for this i dont want to wait for 10 seconds. i want this message immediately 
after program termination

That is even simpler... :)

./yourcmd

[ $? -eq 0 ] && echo success

the other syntax is useful if you want to kill a process if it is taking
too long.

Kiran.

Other related posts: