In Windows Batch/CMD, to pause the execution of a script, you would use
echo 'This is before pause.' pause echo 'The key was pressed, continuing...' How would this be realised using a standard terminal like say bash (but zsh or others should also work at best)? I could of course write an easy C application, but I can't believe, that there is no canonical way - sleep is not, what I'm looking for.
I found these straight-forward approaches using read:
read -p 'Press [Enter] key to start backup...'read -p 'Press any key to resume ...'read -s -n 1 -p 'Press any key to continue . . .'inside a function
but they give me XXX.sh: 4: read: arg count for the first two or 3: read: Illegal option -n respectively. I'm using bash 4.4.19(1)-release.