one more try.
I need sort of pause function for a bash script.
Links which have been provided don't work and a working command has not been shown.
read -n1 -r -p key
read -rsp $'Press any key to continue...\n' -n 1 key
read -p "$*"
but the script always runs through - no clue why.
this is the script...
Code: Select all
cp -av /home/pi/programs/ /home/pi/raspi_sav/ cp -av /home/pi/scripts/ /home/pi/raspi_sav/ cp -av /home/pi/openvg/ /home/pi/raspi_sav/ cp -av /home/pi/PIGPIO/ /home/pi/raspi_sav/ if [ -e /media/pi/USB120DRV/Akten ]; then cp -av /home/pi/raspi_sav/ /media/pi/USB120DRV/Akten/ else echo "The folder /media/pi/USB120DRV/Akten does not exist" fi read -p -r -n1 key
file copy is ok, but always runs through.
(remark: anyone who does not want to answer is not forced to do so, so please simply ignore it then! )