Chapter 5 -- "The" shell

Understanding the parts of the command line

Simple execution

CMD [ARG] [ARG] ... [RETURN]

Arguments and options

The common case

The common case

Editing the command line

Pipes

Lists

; && ||

Globs

* ? [ {

Useful globbing

$ touch file{1,2,3}
$ ls file*
file1  file2  file3
$ touch file1.backup file2.backup file3.backup
$ ls file*
$ ls !(*.backup)

Useful utilities and built-ins introduced in Chapter 5

tr example

tr ' \t' '\n' < /etc/hosts

tee example

egrep local /etc/* 2>/dev/null | tee testfile