BashProgramming — by Greg's Wiki (GreyCat)
beginnerpage
Introductory page on writing Bash scripts: scripts need Unix newlines, a first-line shebang and execute permission (chmod +x), followed by how bash parses commands, variables, loops, arithmetic and functions.