bash shell 中的 for 循环
我写了这样一段bash代码
declare -i width=100
for w in {1..$width}
do
echo $w
done
[: {1..100}: integer expression expected
#!/bin/bash
START=1
END=100
for ((i=$START;i<=$END;i++)); do
echo $i
done
#!/bin/bash
START=1
END=100
for i in $(eval echo "{$START..$END}"); do
echo "$i"
done