开发者

Prompt not displaying Hostname for AIX's KSH

Similar to question 1171663, AIX appears to not have the $HOSTNAME option available. $hname and $hostname are also non-existent. Other than doing the following within .profile -

export HOSTNAME=`hostname`

Is there an official manner where AIX users should 开发者_高级运维be capable of getting the proper results when using:

PS1="${HOSTNAME}:\${PWD##*/} \$ "


Haven't tried it, but for the hostname - can't you mix your first example with your second?

PS1="`hostname`:\${PWD##*/} \$ "

Not sure about PWD bit though?


Try this:

export HOSTNAME=`uname -n` 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜