Pause shell or batch scripts until a keypress. Covers CMD pause, PowerShell Read-Host and ReadKey, Bash and POSIX read, macOS, and TTY guards for CI and cron.

#bash #PowerShell #Windows #Linux #macOS #bash #Cheatsheet

https://www.glukhov.org/developer-tools/terminals-shell/press-any-key-pause-bash-powershell-cmd/

Pause Scripts with 'Press Any Key' in Bash, CMD, PowerShell, and macOS

Pause shell or batch scripts until a keypress. Covers CMD pause, PowerShell Read-Host and ReadKey, Bash and POSIX read, macOS, and TTY guards for CI and cron.

Rost Glukhov | Personal site and technical blog