Introduction to Linux Scripting
Laura McWilliams
2 h 51 m
Lecture Overview
In this course, you will learn some basic techniques for scripting with Bash in a Linux environment. The principles learned will be applicable to all computing environments. Throughout the course, as you build a number of sample scripts, you will learn the use of bash shortcuts, shell variables, and built-in commands. You will also learn how to script dynamically on the command line, how to format a script, the use of return values and comments, command substitution, testing conditions, and looping constructs, and how to invoke scripts and obtain input from the command line. You will be better prepared to create your own scripts to use in your computing environment.

Related Learning Path(s):
Linux System Administration - Exam prep
  • Brief explanation of shell scripting
  • Echo command
  • Bash shortcuts
  • Shell variables & exporting
  • Scripting at the command line
  • Creating a new script with vi- formatting including !, comments and capitalization
  • Command substitution
  • Testing conditions
  • Looping constructs
  • Return values
  • Shell built-in commands
  • Executing scripts
  • Basic familiarity with Unix or Linux shell environment
Lecture Modules
In this module, students will learn to script on command line, bash built-in commands - especially the “echo” command, using vi to create a simple script, using #! and comments. The purpose of shell scripting, alternative methods, and different scripting languages are also briefly touched on.

In this module, students will learn about shell variables and variable reuse through exporting, command substitution, return values, bash shortcuts, getting information from the command line, and reading input from the user. They will also learn about how to make variable values affect the current shell environment.
In this module, students will learn about testing conditions, if-then constructs and looping constructs - for/while.
In this module, students will do more with user input, learn to run a script with root authority, and practice linking multiple scripts together.
Try Risk Free

Start a free trial

Skill Me Up subscriptions include unlimited access to on-demand courses with live lab lab environments with our Real Time Labs feature for hands-on lab access.

Subscription Benefits
  • Access to Real Time Lab environments and lab guides
  • Course Completion Certificates when you pass assessments