View Single Post
  #4   (View Single Post)  
Old 25th March 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Is this what you wanted to do?
Code:
#!/bin/sh

command="sleep 5"       # lengthy processing program
trap 'echo .; exit' TERM
printf "running \"$command\" ";
($command; printf " finished with exitcode=$?"; kill $$)&
while [ 1 ]; do printf .; sleep 1; done
Reply With Quote