From bdbec8605e0239822be090b919f40c8e38b3ba49 Mon Sep 17 00:00:00 2001 From: pvincent Date: Wed, 29 Oct 2025 08:39:21 +0400 Subject: [PATCH] interactive --- interactive.bash | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interactive.bash b/interactive.bash index 5a9d4c7..694bf23 100755 --- a/interactive.bash +++ b/interactive.bash @@ -2,5 +2,13 @@ echo $- [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive' + +if test -t 1; then + echo stdout +else + echo NO +fi + + read -p "Answer?: " echo $REPLY