Hour 1

1: Classify each of the following as simple, complex, or compound commands:
    $ ls
    $ date ; uptime
    $ ls –l
    $ echo "hello world"

If you haven't seen some of these commands before, try them out on your system. As you progress through the book, each will be formally introduced.

A1: The first is a simple command. The second is a compound command constructed from two simple commands. The last two are complex commands.
2: What is the effect of putting a semicolon at the end of a single simple or complex command?

For example, will the output of the following commands be different?

$ who am i
$ who am i ;
A2: There is no effect. The output will be the same for both commands.
3: What are the two major types of shells? Give an example of a shell that ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.