From the course: LPI Linux Essentials (010-160) Cert Prep
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Beginning a shell script - Linux Tutorial
From the course: LPI Linux Essentials (010-160) Cert Prep
Beginning a shell script
- Let's talk about scripts. A script is a program written in an interpreted language, typically associated with a shell or a compiled program. In Linux, many scripts are going to be written as shell scripts. These are associated with a bash or another shell. Users can write shell scripts to help automate tedious, repetitive tasks, or to perform new and complex tasks. Scripts perform many of the Linux start up functions as well, so mastering scripting is going to help you manage that start up process for your distribution. Shell scripts are plain text files so they're created in a text editor like vi, Emacs, Nano, or Pico. A shell script is going to begin with a line that identifies the shell that's going to be used to run it. For example, if you see something like #!/bin/bash, you know it's a bash shell. The first two characters, the # and the !, are a special code that tells Linux that this is a script and the rest of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Text files and text editors3m 55s
-
Using vi and nano8m 57s
-
(Locked)
Beginning a shell script2m 33s
-
(Locked)
Commands4m 38s
-
(Locked)
Arguments2m 35s
-
(Locked)
Variables3m 24s
-
(Locked)
Conditional expressions4m 39s
-
(Locked)
Loops and functions3m 48s
-
(Locked)
Exit value2m 17s
-
(Locked)
Turning commands into a script11m 39s
-
(Locked)
-
-
-
-
-