把原来在linux的系统搬到windows下,因为有很多后台运行程序,在linux下是用sh做的。
e.g.  下面一个sh,auto_export.sh文件内容如下:
#!/bin/sh
#
#Script to export
#for x in `ps xww | grep "auto_export.sh" | cut -c1-5`
do
if [ $x != $$ ]
then
kill $x 2>/dev/null
fi
donewhile : ;
do
php -d session.save_path=/dev/null -f /www/auto.php > /dev/null
sleep 5
done但搬到windows下用cygwin上运行说报错,我不知道linux下的shell和cygwin下有什么区别,我只不过是想写个死循环,每几秒用php 运行一个php文件。上网找了N多也没找到
有一个文档里介绍
while循环语法
while cmd;do
     list
done
但具体什么写?哪位用过的朋友请告诉下吧,小弟在此谢过了。