-
-
Save TooTallNate/681256e480d4e8eae52d to your computer and use it in GitHub Desktop.
`node < /dev/tty` doesn't work?!?
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
☮ ~ (master) ⚡ cat read.sh | |
while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do | |
echo "Is this OK?" | |
echo " enter 'yes' or 'no'" | |
echo " or 'show' to see a list of files " | |
read OK | |
done < /dev/tty | |
☮ ~ (master) ⚡ cat read.sh | sh | |
Is this OK? | |
enter 'yes' or 'no' | |
or 'show' to see a list of files | |
Is this OK? | |
enter 'yes' or 'no' | |
or 'show' to see a list of files | |
ye | |
Is this OK? | |
enter 'yes' or 'no' | |
or 'show' to see a list of files | |
yes | |
☮ ~ (master) ⚡ echo "node < /dev/tty" | |
node < /dev/tty | |
☮ ~ (master) ⚡ echo "node < /dev/tty" | sh | |
> | |
sl | |
process | |
.exit | |
WTF?!?! | |
^C☮ ~ (master) ⚡ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment