Entering command sequences

There may be times when it is convenient to place multiple commands on a single line. Normally, bash assumes you have reached the end of a command (or the end of the first line of a multiple-line command) when you press Enter. To add more than one command to a single line, separate the commands and enter them sequentially with the command separator, a semicolon. Using this syntax, the following commands:

$ ls
$ ps

are, in essence, identical to and will yield the same result as the following single-line command that employs the command separator:

$ ls ; ps

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.