u
This commit is contained in:
15
press-anykey-to-exit.sh
Normal file
15
press-anykey-to-exit.sh
Normal 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`
|
||||
Reference in New Issue
Block a user