95 / 102
Hello World
File hello.sh
:
#!/bin/bash echo Hello World
The first line can be ommitted to run the script using a non interactive
shell: bash hello.sh
.
Execute permission must be set to simply run it: ./hello.sh
.
If the directory which contains the file is in the PATH
environment variable, you don't need the path: hello.sh
.
- GNU Bash Online Manual - http://www.gnu.org/software/bash/manual/bash.html
- Bash Guide for Beginners - http://tldp.org/LDP/Bash-Beginners-Guide/html/
- BASH Programming - Introduction HOWTO - http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
- Advanced Bash-Scripting Guide. An in-depth exploration of the art of shell scripting - http://tldp.org/LDP/abs/html/