Make linux bash dot sh file executable shell script

View previous topic View next topic Go down

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
avatar
jamied_uk
Admin

Posts : 2278
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Make linux bash dot sh file executable shell script

Post by jamied_uk on 20th July 2015, 18:54

avatar
jamied_uk
Admin

Posts : 2278
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top


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