Browse Source

interactive

master
pvincent 6 days ago
parent
commit
6c98c9a57c
  1. 20
      interactive.bash

20
interactive.bash

@ -1,20 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo $-
[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
read -p 'press [ENTER] to continue deleting line' < /dev/tty
if test -t 1; then
echo stdout
else
echo NO
fi
read -p "Answer?: "
echo $REPLY
read -p 'press [ENTER] to continue:' < /dev/tty
echo REPLY=$REPLY
Loading…
Cancel
Save