I have a simple shell script that includes the following lines
echo "Hello"
g++ main.cpp -o mainOutput
echo "Shell script ended!"
When I run the script using a terminal, it echoes the messages properly.
It doesn't act the same if I run it by double-clicking on it.
It just creates the mainOutput
without any messages.
I want my script to act the same in both situations. What do you think that I am doing wrong?
$SHELL
at the end of the script. But, it didn't change anything – Caglayan DOKME Feb 16 '21 at 09:39echo
commands do run. – muru Feb 16 '21 at 09:54if [[ -t 0 ]] ...
) and then useecho
or usezenity
to show messages otherwise. – muru Feb 16 '21 at 09:58