Shell scripts contain a series of commands that are executed by an interpreter. Shell scripts are easy to use and can help developers automate frequently performed operations and run sequences of commands as a single command. Sharing your scripts with team members is also possible due to the portable nature of these scripts.
In this lab, you will use fundamental shell scripting commands and tools to write a shell script. The commands used in this lab have been covered in the Shell Scripting, Succinctly course. References to the specific lessons of the course will be provided throughout the lab steps.
Expected outputs for each lab step are provided in the script comments.
The Linux commands and tools referenced in this lab are:
$1
, $@
[]
-s
, -e
if
, elif
, else
for
, do
echo
vim
, nano
, or emacs
Upon completion of this lab, you will be able to:
Familiarity with basic shell scripting and working with a Linux code editor will be beneficial. Refer to the following courses to fulfill the prerequisite:
July 6th, 2022 - Made check one accepting of whitespaces and other functional permutations of solutions
Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications.
Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content.