Bash scripting
Appearance
General
- Run a script
- /bin/sh blah.sh
- Make executable
- chmod +x blah.sh
Run it now that it's executable
- ./blah.sh
- You could create a bin directory for yourself
- mkdir ~/bin
- Add it to your path
- Edit your .bash_profile
- MAC - edit .zprofile
- vi ~/.zprofile
- Add this line to the end of the file
- export PATH="/Users/bbasura/bin:$PATH"
- Log out and back in
- chmod u+x /Users/bbasura/bin/blah.sh
- cd /Users/bbasura/bin
- Run simply with: blah.sh