Created
May 7, 2020 20:13
-
-
Save morulus/5848b8a9af6c1794191330ac96faa2ba to your computer and use it in GitHub Desktop.
Kill subshell process on press any key (bash)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pid=$(sleep 1000 & echo "$PPID") & | |
npx -q press-any-key "Press any key to stop subshell" && kill "$pid"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment