变化的PS1
发表于 : 2014-02-06 16:46
主机名不同,ssh过去的时候,变颜色
thiscolor=`expr $(printf "%d" "'$(hostname|cut -b 6)") % 7 + 1` 星期不同,变颜色
thiscolor=`date +%u`
PS1="\[\e[3$thiscolor;40m\]\D{%Y-%m-%d %a} \t \H \w \[\e[m\] \n● "
thiscolor=`expr $(printf "%d" "'$(hostname|cut -b 6)") % 7 + 1` 星期不同,变颜色
thiscolor=`date +%u`
PS1="\[\e[3$thiscolor;40m\]\D{%Y-%m-%d %a} \t \H \w \[\e[m\] \n● "