Ready for Linux

Switch with confidence

Optional related walkthrough

Bash shell scripting for beginners

Use this beginner Bash tutorial as an optional overview for the scripting course. The lessons introduce scripts and later concepts in their own order; follow their supplied files, arguments, and expected results for practice.

Video published . Study notes by Ready for Linux.

Study notes: Bash shell scripting for beginners

A script stores commands in a file so you can run the same sequence again. Start with a message before adding variables, arguments, conditions, and loops. Save the example below as hello.sh and run bash hello.sh. The course guide introduces a second example that reads a filename from an argument.

# Save as hello.sh:
printf '%s\n' 'Hello from Bash'

# Run from your terminal:
# bash hello.sh

These study notes are a companion example, rather than a video transcript. Use the related lesson's instructions for its assessed task. Full-access lessons require an account and a course pass.

Reference: GNU Bash manual: shell scripts.

Related lessons