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 on 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 : 2471
Join date : 2010-05-09
Age : 36
Location : UK

http://address-shortner.co.uk

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 on 20th July 2015, 18:54

jamied_uk
jamied_uk
Admin

Posts : 2471
Join date : 2010-05-09
Age : 36
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top

- Similar topics

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