Skip to content

BashProgramming — by Greg's Wiki (GreyCat)

beginnerpageLink only (©)

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.

Quick steps

  1. chmod +x yourscript.sh
  2. Put the shebang on the first line with no leading whitespace

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full article on mywiki.wooledge.org

Source: BashProgramming by Greg's Wiki (GreyCat). Licence: Link only (©).

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

bashchmodshebangscripting

More in Linux Bash