This commit is contained in:
luk.lu
2021-07-09 17:10:33 +08:00
parent c0be6a1da0
commit d8c7f0095e
5 changed files with 82 additions and 46 deletions

15
press-anykey-to-exit.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
get_char()
{
SAVEDSTTY=`stty -g`
stty -echo
stty cbreak
dd if=/dev/tty bs=1 count=1 2> /dev/null
stty -raw
stty echo
stty $SAVEDSTTY
}
echo "Press any key to exit!"
char=`get_char`