
Introduces the bash shell scripting language for beginners, covering hello world, executable scripts, current shell execution, variables, aliases, and bash rc basics.
Learn to write and run a hello world script in bash by adding a shebang and making it executable with 755, then run it using ./hello.sh.
Move the script to /usr/local/bin to make it accessible from PATH using sudo if permissions block the move. Then run it as hello or hello.sh without dot slash.
Create a bash shell script to switch to a frequent directory, run it in the current shell with dot, set executable permissions, and use an alias for easy access.
Learn how to declare and unset variables in the Bash shell, handle empty variables, assign strings or numbers, and perform arithmetic inside double parentheses.
Learn how to save shell state by configuring bashrc, creating aliases, and organizing with a dot bash aliases file so your commands persist across sessions.
Understand exit status as the last command's outcome, with 0 indicating success and non-zero signaling errors, and learn to echo $? to capture it in scripts.
Learn how to use the bash if statement and [ -e foo ] to test file existence, interpret exit statuses (0 for true, 1 for false), and structure then else blocks.
Write a bash script that accepts exactly one command line argument as a filename, reports whether it exists using the -e test, and shows usage for incorrect arguments.
Learn to build a bash guessing game that seeds a random number with the script PID, validates an argument, and uses a while loop with read and if/elif/else for guesses.
Explore loops in bash by comparing for, while, and until constructs, using the sequence command and range syntax to count from 1 to a given argument.
Master the bash case statement to implement a multi-branch menu in Linux. Use regular expressions to match choices such as 1, 2, 3, and q, with a default case.
This course teaches beginning Linux shell scripting in the Bash shell. The emphasis in the course is on the scripting language itself: using scripts to automate common tasks, and the logic within the language used to control the execution of the script.
The course is in two units, and contains over an hour of demos and discussion. This is the second part of the Linux course series from EDUMobile Academy.
In the first unit of the course, we’ll explore the shell environment itself, and cover such topics as:
- a simple hello world script
- making scripts executable
- why we run a script with a ./ and how to remove it
- running a script to act upon the currently running shell
- variables and how to use them
- the .bashrc file
The second unit covers scripting commands, particularly control flow. Topics include:
- exit status of shell commands
- the if statement and tests
- handling command line arguments
- random numbers
- loops (while, until, and for)
- the case statement
I hope you join me for this beginner’s guide to the bash scripting language!