Skip to content

Instantly share code, notes, and snippets.

@jack126guy
Last active May 28, 2020 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jack126guy/26a9f1bb8da7fce16ace to your computer and use it in GitHub Desktop.
Save jack126guy/26a9f1bb8da7fce16ace to your computer and use it in GitHub Desktop.
Emulate the DOS/Windows PAUSE command on Unix-like systems
#!/bin/sh
#You probably want to put this in /usr/local/bin
echo "Press Enter to continue... "
read REPLY
.TH PAUSE 1
.SH NAME
pause - pause execution pending further input
.SH SYNOPSIS
.B pause
.SH DESCRIPTION
Pause execution and prompt for input to continue. This is an
emulation of the DOS/Windows
.B PAUSE
command in a simple shell script.
.SH BUGS
Unlike the DOS command, this command does not accept any key to continue,
only the Enter key.
.SH AUTHOR
Jack126Guy <someanon126@gmail.com>
.SH COPYRIGHT
The program and this manual are released into the public domain under
Creative Commons CC0 1.0 Universal:
<http://creativecommons.org/publicdomain/zero/1.0/>
.SH SEE ALSO
.BR sleep (1),
.BR sh (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment