Separating and Grouping Commands

This section applies to the Bourne Again, TC, and Z Shells. Whether you give the shell commands interactively or write a shell script, you must separate commands from one another. This section reviews the ways to do this that were covered in Chapter 5 and introduces a few new ones.

; and NEWLINE Separate Commands

The NEWLINE character is a unique command separator because it initiates execution of the command preceding it. You have seen this throughout this book each time you press the RETURN key at the end of a command line.

The semicolon ( ; ) is a command separator that does not initiate execution of a command and does not change any aspect of how the command functions. You can execute a series of commands ...

Get A Practical Guide to Red Hat® Linux® 8 now with O’Reilly online learning.

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