
pwd, ls, cd, echo; tilde (~), .. and .
Explore basic Bash concepts like variables, pipes, filters, and aliases, and see how to use less, more, and tree to view commands and the filesystem.
learn how to read ls -l output and interpret file types and permissions, including user, group, and others, and use chmod to modify rights and make scripts executable.
metacharacters: | & ; < > space tab newline
and: ~ $ #
strong quoting - single quotes protect everything between them from the shell
weak quoting - double quotes protect everything except the $, the backslash (\) and (not so relevant) the back quotes (``)
backslash - protects the next character from the shell
(Not so) special case: Filenames and strings containing spaces (and potentially) other weird characters.
Learn command substitution in Bash by capturing output with $(seq 1 3). Use cut and sleep to format results and drive simple arithmetic in for loops.
simple commands, control operators: || & && ; ;; ;& ;;& | |& <newline>
brace expansion, tilde expansion, parameter/variable expansion, command substitution, arithmetic expansion, filename expansion, quote removal
Every program:
- reads input from its standard input channel (stdin, 0 - usually the keyboard),
- writes its output to the standard output channel (stdout, 1 - usually the screen)
- sends error messages to the standard error channel (stderr, 2 - usually also the screen).
All channels can be directed elsewhere (or even closed).
Pipes and other redirections in action. Use |& to redirect both stdout and stderr into a pipeline.
Explore how the tr command translates and replaces characters using set1 and set2, and learn to delete with -d, squeeze with -s, and perform case conversion with [:lower:] and [:upper:].
Demonstrate using and or in bash to control command flow by prior success, with true and echo, and show the test command for file existence with silent redirection.
Learn to write bash shell scripts, include a shebang, locate bash with which, and execute scripts via bash, source, or by making them executable with proper exit statuses.
You'll finish this course with a solid grasp on the Bash shell, it's programming environment and syntax. In addition you'll learn many essential Linux commands. The course essentially follows the outline of the Bash Reference Manual and the Bash manual page but it's easier to follow due to a hands-on approach and many examples.