Linux shell script: pause a command before continue
December 08, 2011 14:32:06 Last update: December 08, 2011 14:32:06
Use the
read command to pause a shell script and give the user a chance to stop it:
#!/bin/sh echo "Press CTRL-C to stop this script..." echo "Press any other key to continue..." read DISCARD