Several commands in my .sh are not executing properly when I run the .sh from the launcher. But they work just fine when I type the filename.sh in a terminal.
I get errors from illegal option error from
read -t
It is also weird. It also says filename.sh not found. But it is obviously running the the other code within. I am assuming that it is a side effect of the above error.
Code below-
Any ideas?
echo program running
while true; do
source /usr/bin/other-program-name
echo Type q to quit
sleep 1
read -t .025 -n 1 input
if [[ $input = “q” ]] || [[ $input = “Q” ]]; then
#this breaks the loop.
echo
break
fi
done