Skip to content
$ lynuxpro
← All courses

STAGE 1 · FOUNDATIONS · COURSE 2

Bash Scripting

Automate everyday work with Bash: variables, conditions, loops, functions, text processing, error handling and real automation projects.

Beginner to Expert · 17 lessons · about 5 hours · Free

Free courseEvery lesson is open, no payment needed.

Free accounts get 2 live lab sessions a day, 15 minutes each. Pro gives you unlimited labs.

See Pro plans

How Bash Scripting fits together

HOW IT WORKSWhat Bash does with every line you type

BASHread lineYou / scripta line of textParsewords, pipes, &&Expand$var $(cmd) *.logRedirect> file 2>&1Builtin?cd, echo, readfork + execfind in $PATHProgramgrep, awk, curlExit code$? 0 = success
1/6

Bash reads one line (from your keyboard or a script) and splits it into words and operators like |, && and ;.

$ grep -c ERROR $LOG > count.txt && echo done

Lessons

AFTER THE LAST LESSONBash scripting cheat sheetVariables, quoting, conditions, loops, functions, arrays, text tools, error handling and the script template, on one page.FINAL PROJECT · ABOUT 40 MINLog analyser scriptWrite a small, safe, reusable script that summarises any log file: the kind of tool every ops team keeps in ~/bin.

Next in the curriculum

Git

Continue →