
| <Helios:sparc> 0 [02-12 08:57] ~ (0 Mb) ! |
| PS1="\n<\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;37m\]\u\[\033[0m\]> \j [\$(date +%m-%d\" \"%H:%M)] \w (\[\033[0;36m\]\$(/Users/sparc/bin/TBytes.sh) Mb\[\033[0m\])\n! " |
! cat ~/bin/TBytes.sh |
|
\a |
an ASCII bell character (07) |
|
\d |
thedatein "Weekday Month Date" format (e.g. Rue May 26) |
|
\D{format} |
|
|
|
the format is passed to strftime(3)andtheresultis |
|
|
insertedinto the prompt string; an empty format results |
|
|
in a locale-specific time representation.The braces are |
|
|
required |
|
\e |
an ASCII escape character (033) |
|
\h |
the hostname up to the first `.' |
|
\H |
the hostname |
|
\j |
the number of jobs currently managed by the shell |
|
\l |
the basename of the shell's terminal device name |
|
\n |
newline |
|
\r |
carriage return |
|
\s |
thenameof the shell the basename of $0 (the portion following the final slash) |
|
\t |
the current time in 24-hour HH:MM:SS format |
|
\T |
the current time in 12-hour HH:MM:SS format |
|
\@ |
the current time in 12-hour am/pm format |
|
\A |
the current time in 24-hour HH:MM format |
|
\u |
the username of the current user |
|
\v |
the version of bash (e.g. 2.00) |
|
\V |
the release of bash version + patchelvel (e.g. 2.00.0) |
|
\w |
the current working directory |
|
\W |
the basename of the current working directory |
|
\! |
the history number of this command |
|
\# |
the command number of this command |
|
\$ |
if the effective UID is 0 a # otherwise $ |
|
\nnn |
the character corresponding to the octal number nnn |
|
\\ |
a backslash |
|
\[ |
begin a sequence of non-printing characters which could |
|
|
beusedtoembeda terminal control sequence into the |
|
|
prompt |
|
\] |
end a sequence of non-printing characters |
|
|
PS1='[\u@TEST \w]\n \#\$ \n\ |
|
\[\ |
end a sequence of non-printing characters |
|
|
\e[1mBold Text\e[m\n\ |
|
|
\e[4mUnderline Text\e[m\n\ |
|
|
\e[5mBlink Text\e[m\n\ |
|
|
\e[7mInverse Text\e[m\]\n\ |
|
|
Should be normal text |
|
|
Foreground colors: |
|
|
\[\ |
|
\e[0;30m |
Black\n\ |
|
\e[0;31m |
Red\n\ |
|
\e[0;32m |
Green\n\ |
|
\e[0;33m |
Yellow\Orange\n\ |
|
\e[0;34m |
Blue\n\ |
|
\e[0;35m |
Magenta\n\ |
|
\e[0;36m |
Cyan\n\ |
|
\e[0;37m |
Light Gray\Black\n\ |
|
\e[0;39m |
Default\n\ |
|
Bright foreground colors: |
|
|
\e[1;30m |
Dark Gray\n\ |
|
\e[1;31m |
Red\n\ |
|
\e[1;32m |
Green\n\ |
|
\e[1;33m |
Yellow\n\ |
|
\e[1;34m |
Blue\n\ |
|
\e[1;35m |
Magenta\n\ |
|
\e[1;36m |
Cyan\n\ |
|
\e[1;37m |
White\n\ |
|
\e[0;39m |
Default\n\ |
|
Background Colors |
\e[m\] |
|
\[\e[1;37m\e[40m: |
Black\e[0;49m\n\ |
|
\e[41m: |
Red\e[0;49m\n\ |
|
\e[42m: |
Green\e[0;49m\n\ |
|
\e[43m: |
Yellow\Orange\e[0;49m\n\ |
|
\e[44m: |
Blue\e[0;49m\n\ |
|
\e[45m: |
Magenta\e[0;49m\n\ |
|
\e[46m: |
Cyan\e[0;49m\n\ |
|
\e[47m: |
Light Gray\Black\e[0;49m\n\ |
|
\e[49m: |
Default\e[m\]\n' |
When you drag awk into it, why bother with grep and
for? awk does it all: