Code Sample |
( o_ / >) [~] |
Code Sample |
# SSHHOST shows the arp table, grepping it for the line with the ip address you are shhing from in, then cuts the hostname out [ -n "$SSH_CLIENT" ] && SSHHOST=$(arp -a | grep `echo $SSH_CLIENT|cut -f1 -d\ ` | cut -f1 -d\ ) # Creating command prompt, using SSHHOST to add dynamic host name to prompt if SSHing in # PS1 = [Cyan/Underlined](Host where you are SSHing from)[No Color][Blue](SHHing through)[Light Red/Bold](User AT host:PWD)(Space)[No Color] [ -n "$SSHHOST" ] && PS1=$'\\[\E[36;0;4m\\]$SSHHOST\\[\E[0m\\]\\[\E[36;0m\\]*\\[\E[31;1m\\]\\u@\\h:\\w \\[\E[0m\\]' |