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

Execute compound commands - Linux Tutorial

From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)

Start my 1-month free trial

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…

Contents