谁能告诉我这个脚本有什么问题?
`for i in {1..7};
do for j in {1..5};
$a =$ix630;
$y =$jx900;
do
mogrify
-crop $ax$y+675+900 +repage /home/vas/Documents/Web_Design/Mold%20ISEF%202014/poster/Ready/body_final.png;
done;
done`
答案1
您是否尝试在嵌套for
循环中执行一些乘法并将值分配给a
和y
?
检查此处生成的值:
#!/bin/bash
for i in {1..7}; do
for j in {1..5}; do
a=$(( $i*630 ))
y=$(( $j*900 ))
echo "a: " $a "y: " $y
done
done