[NTLUG:Discuss] bash Script help
Bobby Wrenn
bobby at wrennest.com
Wed Aug 28 14:05:59 CDT 2013
I am having trouble getting a script to execute a script. When the
parent script ends it should execute the last line of the script. It
works all the way to the last echo and then just exits. Any help
appreciated. I need to ship this system to the South Pacific next week.
Here is the script:
====================
#!/bin/bash
#clear
#/usr/local/apps/Wallpaper/set_bg /root/ViewCastWallpaper.bmp
clear
COUNT=10
echo 'Factory Restore will be performed if you no key is pressed in 10
seconds...'
while [ $COUNT -gt 0 ]; do
echo Factory Restore will be performed in $COUNT seconds..
echo Press any key to abort!
echo ' '
read -sn 1 -t 1 Key
echo $Key
#if [ $# -eq 2 ] ; then
if test -z "$Key"; then
echo no key pressed
else
exit 0
fi
let COUNT=COUNT-1
#sleep 1s
clear
done
#perform the factory restore!
echo Factory Restore will start now!
./FactoryRestore.sh&
==================
More information about the Discuss
mailing list