khanat-opennel-code/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever
2014-11-07 19:32:18 +01:00

30 lines
No EOL
402 B
Bash

#!/bin/sh
while true
do
if [ "$2" = "" ]
then
echo
echo USAGE: $0 sleep_time command_line
echo
echo example:
echo $0 3 echo hello world
echo waits 3 seconds then displays 'hello world' repeatedly, asking player to hit enter between each line
echo
break
fi
sleep $1
shift
CMD=$*
while [ "$CMD" != "" ]
do
eval $CMD
echo "press enter"
read toto
done
break
done