|
因为工作需要要在 linux 和 unix 之间切换,就要有相应的设定。于是写了下面
的脚本。在linux下正常,但是在 unix 下就会说找不到 whoami ,可能是
source 那句没起作用。请问我写得有问题吗?
#!/bin/csh
#
set HOSTOS = `uname`
if ( $HOSTOS == "SunOS" ) then
if ( -f /home/tools/cshrc.systerm ) then
source /home/tools/cshrc.system
else if ( -f /etc/cshrc.system ) then
source /etc/cshrc.system
endif
endif
#--- PERSONAL ALIASES ---
if ( $?prompt ) then
set history=50
set savehist=50
endif
alias cd 'cd \!*;set prompt="`hostname`{`whoami`}:`pwd`> "'
set prompt="`hostname`{`whoami`}\!: " |
|