修复了PS1的变量BUG
This commit is contained in:
parent
e3dd04a0ba
commit
aa5767e0d8
@ -77,7 +77,7 @@ cat>>/etc/profile<<EOF
|
||||
##########以下是用户登录及操作记录代码##############
|
||||
PS1='\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[1;35m\H\e[m \e[4m\`pwd\`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n$'
|
||||
|
||||
USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`
|
||||
USER_IP=\`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'\`
|
||||
if [ "\$USER_IP" = "" ]
|
||||
then
|
||||
USER_IP=\`hostname\`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user