Skip to content

Instantly share code, notes, and snippets.

@shiloong
Forked from james2doyle/press-any-key.sh
Created March 13, 2018 07:05
Show Gist options
  • Save shiloong/5e1281fb07bcec15fd1d01b5e7b76a71 to your computer and use it in GitHub Desktop.
Save shiloong/5e1281fb07bcec15fd1d01b5e7b76a71 to your computer and use it in GitHub Desktop.
bash implementation of "press any key to continue"
#!/bin/bash
read -n 1 -r -s -p "Press any key to continue..."
# this will fire after the key is pressed
echo "\ncool"
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment