Prev | Current Page 182 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

The file must be in the same format as /etc/hosts.
Here are a few examples of command completion. (When you see , it means to press the Tab
key on your keyboard.) Type the following:
$ echo $OS
$ cd ~ro
$ fing
The first example causes $OS to expand to the $OSTYPE variable. In the next example, ~ro
expands to the root user??™s home directory (~root/). Next, fing expands to the finger command.
Of course, there will be times when there are several possible completions for the string of characters
you have entered. In that case, you can check the possible ways text can be expanded by
TIP
51
Running Commands from the Shell 2
pressing Esc+? (or by pressing Tab twice) at the point where you want to do completion. This
shows the result you would get if you checked for possible completions on $P.
$ echo $P
$PATH $PPID $PS1 $PS2 $PS4 $PWD
$ echo $P
In this case, there are six possible variables that begin with $P. After possibilities are displayed, the
original command line returns, ready for you to complete it as you choose.
Command-Line Recall
After you type a command line, that entire command line is saved in your shell??™s history list. The
list is stored in a history file, from which any command can be recalled to run again.


Pages:
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194