Workshop

The Workshop summarizes the key terms you learned and poses some questions about the topics presented in this chapter. It also provides you with a preview of what you will learn in the next hour.

Key Terms

basename The closest directory name. For example, the basename of /usr/home/ tayloris taylor.

command number The unique number by which the shell indexes all commands. You can place this number in your prompt by using !and use it with the history mechanism as !command-number.

Exercises

1:How do you tell the C shell that you want it to remember the last 30 commands during a session, and to remember the last 10 commands across login sessions?
2:Assume that you get the following output from entering history:
1    ls -CF
2    who | grep dunlaplm
3    wc -l < test
4    cat test
5    history

What would be the result of entering each of the following history commands?

!2    !w    !wh    echo !1

3:Some UNIX systems won't enable you to do the following. What danger do you see lurking in this alias?
alias who    who -a

4:Which of the following aliases do you think would be useful?
alias alias who
alias ls cp
alias copy cp -i
alias logout vi
alias vi logout
alias bye logout

5:Set your prompt to the following value. Remember that 33 should be replaced with the appropriate command number each time.
#33 - I know lots about UNIX. For example:

6:Find and examine two shell scripts that are found in either the /bin or the /usr/bin directories on your system. Remember, any line beginning with a # is a comment.

Preview of the Next Hour

In the next hour, you learn how to get even more out of your shell. You learn about shell programming and how to create shell programs on-the-fly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset