linux shell 和 php结合使用

1.新建 xxc.sh 文件

   在文件中,可以写shell命令如

#!/bin/bash
step=99
for (( i=0; i<=step; i++ )); do
	/usr/local/services/php/bin/php /data/www/crontab/push/cron_apns.php $i > /tmp/push_token 2>&1
done
exit 0

 其中,> 表示将左边执行结果覆盖输入到右边文件。>>表示将执行结果追加到右边文件末尾。

 

posted @ 2019-04-11 16:09  xc_flying  阅读(644)  评论(0编辑  收藏  举报