PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Make linux bash dot sh file executable shell script

Go down

Make linux bash dot sh file executable shell script Empty Make linux bash dot sh file executable shell script

Post by jamied_uk 20th July 2015, 18:05

Code:

#!/bash
# (c) J~Net Menu 2015
# ~~~~~~~~~~~~~~~~~~~
# cd ~/scripts
# sudo chmod +x menu.sh    <<< to make executable!
#
while :
do
clear
echo "J~Net Menu 2015"
echo "1. NSlookup"
echo "2. Gnome Terminal"
echo "3. Netstat"
echo "4. Process List"
echo "9. Exit"
echo -n "Please Make A Choice"
read opt
case $opt in
1) nslookup;;
2) gnome-terminal;;
3) netstat;;
4) htop;;
9) exit;;
*) echo"$opt is an invalid Option. Press Enter To Continue..."
read enterkey;;
esac
done


Code:
Above file example is a Menu example and you can make it executable inside the file above you can find example on how to do that!

Code:
sudo chmod +x menu.sh


Code:
python menu.sh
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Make linux bash dot sh file executable shell script Empty Re: Make linux bash dot sh file executable shell script

Post by jamied_uk 20th July 2015, 18:54

jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum