Shell脚本

1. 获取某个目录下的所有后缀为.json,放入convert.php中运行:

DATA='./data'
for file in $(ls $DATA/*.json); do
php convert.php < $file 
done

 

2.for循环 //注意引号

for i in `seq 100`
do
    if((i%3==0))
    then
        echo $i
        continue
    fi
done

 

posted @ 2016-10-12 17:04  chenhuan001  阅读(111)  评论(0编辑  收藏  举报