Skip to content

Instantly share code, notes, and snippets.

@malinky
Last active August 29, 2015 14:13
Show Gist options
  • Save malinky/d08b1ac902b11847a2c1 to your computer and use it in GitHub Desktop.
Save malinky/d08b1ac902b11847a2c1 to your computer and use it in GitHub Desktop.
Setting up and Running Shell Script
# Open terminal stay in home directory.
# Running first command results in Permission Denied error so we need to make script executable.
# The commmands ls -l are used to check permissions have been changed.
# Change back to home directory to show script will run from anywhere.
filename.sh
cd /usr/local/bin
ls -l
chmod +x filename.sh
ls -l
cd
filename.sh
#Simplified Set Up
cd /usr/local/bin
chmod +x filename.sh
#Running Script
filename.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment