shell的for循环

RobinLiew 2014-12-11

#!/bin/sh
for i in `ls`
do
    echo $i;
    cwebp -q 85 $i -o "../bb/"$i;
done
#!/bin/sh
num = 0;
for i in `ls`
do
    let num=${num}+1;
    echo $i" "$num;
   # cwebp -q 85 $i -o "../aa/"$num".jpg";
    cp $i  "../aa/"$num".jpg";
done

相关推荐

zhuxianfeng / 0评论 2020-02-09