the common functionality of the popular Linux shells
the common shell metacharacters
output and input redirection
filename substitution
pipes
command substitution
command sequences
grouped commands
the construction of scripts
the difference between local and environment variables
the two different types of quoting
basic job control
the mechanism that the shell uses to find commands
several core built-in commands
[Page 201]
Quiz
1.
Can you change your default login shell?
2.
What shell command is used to change your current directory?
3.
What is the difference between a built-in command and a utility?
4.
How can you make a script executable?
5.
Describe a common use for command substitution.
6.
Describe the meaning of the terms parent shell, child shell, and subshell.
7.
How do you think the kill command got its name?
8.
Describe a way to override a standard utility.
9.
What is a good umask value, and why?
Exercises
1.
Write a script that creates three background processes, waits for them all to complete, and then displays a simple message. [level: easy]
2.
Experiment with the exec command by writing a series of three shell scripts called "a.sh," "b.sh," and "c.sh" that each display their name, execute ps, and then exec the next script in the sequence. Observe what happens when you start the first script by executing exec a.sh. [level: medium]
3.
Why is the file that is created in the following session unaffected by the umask value? [level: medium]
$ ls -lG date.txt-rw-rw-rw- 1 glass 29 Aug 20 21:04 date.txt $ umask 0077 $ date > date.txt $ ls -lG date.txt -rw-rw-rw- 1 glass 29 Aug 20 21:04 date.txt $ _
Project
1.
Compare and contrast the Linux shell features against the graphical shells available on Windows. Which do you think is better? [level: medium]