Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://unix.stackexchange.com/a/134554/130767

Function:


pause(){
 read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
}

Test:

pause(){
 read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
}
#!/bin/bash

echo "Before Pause"
pause
echo "After Pause"
  • No labels