Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function pause() {
- if [ "$#" -eq 0 ]
- then
- PROMPT="Press any key . . ."
- else
- PROMPT="$1"
- fi
- read -n1 -r -p "$PROMPT"
- }
- # Default behavior.
- pause
- # Custom prompt.
- pause "Press that any key!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement