shell的for循环

#!/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

相关推荐