February 2001
Beginner to intermediate
448 pages
9h 2m
English
Earlier it was discussed that my customized prompt gives a number associated with the command that was run. As commands are run, they are saved in the history file. Think of it as building a script as you go along. A couple of benefits of having this file are evident. First is the ability to repeat a command without having to retype it, and second is that the commands can then be saved in a different file for later scripting. For ease of viewing, here is the prompt string again:
PS1="$HOSTCHAR"':${PWD#HOME/} :!$ '
Notice that it looks slightly different from the output the set command provides:
PS1='MOOSE:${PWD#HOME/} :!$ '
This is because the value for the varname HOSTCHAR is interpreted in the set command.
Read now
Unlock full access