目录跳转
if [ ! -n "$1" ];then
echo ". g 0 [进入shell目录]"
echo ". g 1 [进入df‘s home]"
echo ". g shellName [运行shell]"
elif [ "$1" == 0 ];then
cd ~/shell/
elif [ "$1" == 1 ];then
cd ~/"df's home"/shell/
else
. ~/shell/$1 $2 $3
fi
if [ ! -n "$1" ];then
echo ". g [websiteName][0:查看目录]"
elif [ $1 == 0 ];then
ls /www/wwwroot/
elif [ -d "/www/wwwroot/$1.dfer.top" ];then
cd /www/wwwroot/$1.dfer.top
elif [ -d "/www/wwwroot/$1.df315.top" ];then
cd /www/wwwroot/$1.df315.top
fi
if [ ! -n "$1" ];then
echo ". g websiteName"
else
cd /www/wwwroot/$1.df315.top
fi
根据参数进行判断跳转到特定目录
if [ ! -n "$1" ]; then
echo "1:nwq;0:web"
elif [ $1 == "1" ]; then
cd /www/web/nwq_ycwjwl_com/public_html
elif [ $1 == "0" ] ; then
cd /www/web/
else
echo "1:nwq;0:web"
fi
save as “go”
run by “. ~/go”