Last active
May 24, 2016 08:06
-
-
Save jonbartlett/a006af867e6d58a21a28bb57b3495238 to your computer and use it in GitHub Desktop.
AIX Ksh Prompt Colour by Hostname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Prompt colour by host | |
# | |
# install: | |
# | |
# cat .profile_colour >> ~/.profile | |
# | |
NODE=`uname -n` | |
case $NODE in | |
dj2102d-dbsa001) # DEV = green | |
PS1="$(whoami)@[32m$(hostname)[00m(\$PWD)$ " | |
;; | |
dj2102t-dbsa001) # TST = green | |
PS1="$(whoami)@[32m$(hostname)[00m(\$PWD)$ " | |
;; | |
dj2102e-dbsa001) # PRE-PROD = yellow | |
PS1="$(whoami)@[33m$(hostname)[00m(\$PWD)$ " | |
;; | |
dj2102b-dbsa001) # BAT = yellow | |
PS1="$(whoami)@[33m$(hostname)[00m(\$PWD)$ " | |
;; | |
dj2102p-dbsa001) # PRD = red | |
PS1="$(whoami)@[31m$(hostname)[00m(\$PWD)$ " | |
;; | |
*) # other = cyan | |
PS1="$(whoami)@[36m$(hostname)[00m(\$PWD)$ " | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment