Hi All,
Have written a script file as follows:

mysqldump -u xxx -pxxx dbase1 > backup.sql
DATETIME=`date +%Y-%m-%d--%H-%M-%S`
mv backup.sql /home/user01/dumps/Backup_${DATETIME}.sql
read -p "Backup Complete.  Press a Enter to exit"

If I run the script by typing it's name at a terminal prompt it runs fine, but if I use the gui and then double-click the icon for the script it runs, but doesn't pause for the user to see the 'Complete' message. I have tried clicking 'Run in Terminal' and 'Run' but neither pauses. The rest of the script runs correctly, as the backup file is created and renamed to current date/time - it's just the last line of the script that I am having problems with. Basically I want to re-create the old DOS 'pause' command at the end of the script.

Running Ubuntu 12.04 LTS

toomutch

You could add

sleep X

as a fifth line where X s the number of seconds till it continues or use

echo "Backup Complete" | more -d

instead of the read -p to get it to prompt with

Backup Complete
[Press space to continue, 'q' to quit.]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.