So I was writing some scripts for a demo that I delivered earlier today...
One script will run on my Mac, using the Zsh shell, the other will run on an Ubuntu box, using Bash.
In both cases, I wanted to pause the script and wait for user input before proceeding.
On Ubuntu, I did this: -
read -p "Press [Enter] to continue"
Sadly, however, on macOS 12.4 via zsh, that didn't work ...
read: -p: no coprocess
Thankfully, there's a better / different way: -
read "?Press [Enter] to continue"
which is nice
No comments:
Post a Comment