I have a file that has a list of bash commands like the following:
echo 'foobar'
echo 'helloworld'
echo 'ok'
And I can execute these commands by simply piping them to /bin/bash
like so:
cat commands | /bin/bash
Now, how do I pause the execution right in the middle, and wait for the user input? Using read
does not seem to work.
echo 'foobar'
echo 'helloworld'
read -p 'Press ENTER to continue'
echo 'ok'