北京赛福基因招聘生物信息分析员、IT前端、后端及产品经理# Biology - 生物学
m*g
1 楼
能不能帮忙把这个shell script转成php?多谢!
#!/bin/sh
#Program to generate MD5 to compare across machines (mostly app servers)
if [ "$1" = "often" ]
then
/usr/bin/md5sum /home/famnet/slugs/connectslug.php > /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-often
/usr/bin/md5sum /usr/local/apache/c/functions/sesscheck.php >> /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-often
fi
if [ "$1" = "daily" ]
then
/usr/bin/find /usr/local/apache/htdocs -type f -exec /usr/bin/md5sum {} \; > /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-daily
fi
#!/bin/sh
#Program to generate MD5 to compare across machines (mostly app servers)
if [ "$1" = "often" ]
then
/usr/bin/md5sum /home/famnet/slugs/connectslug.php > /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-often
/usr/bin/md5sum /usr/local/apache/c/functions/sesscheck.php >> /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-often
fi
if [ "$1" = "daily" ]
then
/usr/bin/find /usr/local/apache/htdocs -type f -exec /usr/bin/md5sum {} \; > /home/famnet/MD5s/`/sbin/ifconfig | grep 172.16.1 |head -n 1| awk '{print substr($2,index($2,":")+1)}'`-daily
fi