0

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?

0 Answers0