I'm fairly good with windows .bat scripts and normally use the pause command while developing them so I can see things step by step as the script runs in the command prompt. I am trying to do something similar with a Linux Bash file. I have a very simple bash, which can be seen below...
#!/bin/bash echo Hello World! read -p "Press [Enter] key to continue..."
I configured Nautilus (a Linux file management program) to "Run executables when they are double clicked" but I don't see anything when I double click the script. Do I need to re-route output to the console or something?
Here is how I achieved what I wanted...
- Create a .sh file (I am using one from above)
- Open Nautilus
- Click Edit -> Preferences -> Behavior tab
- Under "Executable Text Files" choose "Ask Each Time" Radio button
Now when you click on .sh files, you will be prompted with a few options. Option "Run in Terminal" does exactly what I want. Thanks everyone for the contributions!
ps -ef, you will see something running there.