this works: loop "mycommand -parms" 5 this doesn't: loop "mycommand -parms | othercommand" 5 #!/bin/bash # Loop a command # Usage loop "command" delay_between_loops I=1 while [ 1 ] do $1 echo echo "*** Loop $I ended ***" echo sleep $2 I=`expr $I + 1` done