From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Execute compound commands - Linux Tutorial
From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)
Execute compound commands
- [Narrator] A simple command is any of the commands you type in on a regular basis. For instance, ls or grep root /etc/psswd. These are simple commands. When we refer to compound commands, things get more complex. A compound command, is a couple of commands that are grouped in some way and are all executed in close succession. We have a couple of ways of doing this, we can specify a second command that runs after the completion of our first command, type clear and then type in echo "hi" ; echo "there" and hit enter. This will run the first echo command and when it completes, it runs the second echo command. Note that the second echo command runs no matter where the first command succeeds or not. This is really the same thing as typing in the first command, hitting enter and typing in the second command and hitting enter again. It just queues up the command so we don't have to wait. If you only want the…
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
-
-
-
-
Introduction to Bash2m 9s
-
What is a shell script?3m 57s
-
Execute compound commands5m 59s
-
Use Command and Variable substitution6m 21s
-
Conditional flow with if, then if3m 12s
-
Conditional flow with case2m 21s
-
Iterate with for loops2m 42s
-
Iterate with while loops1m 30s
-
Using return codes6m 32s
-
Create a monitor script3m
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-