首页 > 代码库 > shell脚本学习

shell脚本学习

#!/bin/sh
ip=`ifconfig eth0 | grep inet | awk {print $2}`
ip1=x.x.x.x

if [ "$ip" == "$ip1" ]; then
dir=/home/wwwroot/default/guoyi/Pay/
else
dir=/home/web/guoyi/Pay/
fi

php ${dir}index.php order_task

 

shell脚本学习