@radius与SCREENRC有关,但不是一个很完整的答案,因此我将详细说明...
〜/ .bashrc
# Strip down a FQDN
hostname="$(hostname | sed 's/\..*//')"
# Use the case pattern for server groups
case "$hostname" in
    mario|luigi|toad|peach|koopa*|bowser) export SCREENRC=~/.screenrc_prod;;
    dev*|vm*)  export SCREENRC=~/.screenrc_dev;;
esac
# Use condensed bash "new test*" notation to override for specific servers
# e.g. ~/.screenrc_bowser would get used instead of ~/.screenrc_prod
[[ -f "~/.screenrc_$hostname" ]] && export SCREENRC="~/.screenrc_$hostname"
*始终使用新测试!
关于转义字符的一句话
在脚本中包含颜色的正确方法是使用tput,而不是转义字符。您的转义符特定于您的终端。tput命令可识别终端。我写这篇文章是为了在脚本中花哨的:
〜/ bin / COLORS.sh
GT_RESET=$(   tput sgr0)  # Reset all attributes
GT_BRIGHT=$(  tput bold)  # Set “bright” attribute
GT_DIM=$(     tput dim)   # Set “dim” attribute (normal/non-bright)
GT_ULINE=$(   tput smul)  # Set “underscore” (underlined text) attribute
GT_BLINK=$(   tput blink) # Set “blink” attribute
GT_INVERSE=$( tput rev)   # Set “inverse” attribute
GT_HIDDEN=$(  tput invis) # Set “hidden” attribute
FG_BLACK=$(   tput setaf 0) #foreground to color #0 - black
FG_RED=$(     tput setaf 1) #foreground to color #1 - red
FG_GREEN=$(   tput setaf 2) #foreground to color #2 - green
FG_YELLOW=$(  tput setaf 3) #foreground to color #3 - yellow
FG_BLUE=$(    tput setaf 4) #foreground to color #4 - blue
FG_MAGENTA=$( tput setaf 5) #foreground to color #5 - magenta
FG_CYAN=$(    tput setaf 6) #foreground to color #6 - cyan
FG_WHITE=$(   tput setaf 7) #foreground to color #7 - white
BG_BLACK=$(   tput setab 0) #background to color #0 - black
BG_RED=$(     tput setab 1) #background to color #1 - red
BG_GREEN=$(   tput setab 2) #background to color #2 - green
BG_YELLOW=$(  tput setab 3) #background to color #3 - yellow
BG_BLUE=$(    tput setab 4) #background to color #4 - blue
BG_MAGENTA=$( tput setab 5) #background to color #5 - magenta
BG_CYAN=$(    tput setab 6) #background to color #6 - cyan
BG_WHITE=$(   tput setab 7) #background to color #7 - white
我还制作了一个脚本来演示tput的用法。您可以从这个要点中获得它。
请参阅:
http : //www.ibm.com/developerworks/aix/library/au-learningtput/? S_TACT = 
105AGY06 http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html