linux for循环
2020-06-22 本文已影响0人
Dylan_abaa
for var in item1 item2 ... itemN
do
command1
command2
... commandN
done
for loop in 1 2 3 4 5
do
echo "The value is: $loop"
done
挨个儿输出12345,比如The value is: 1。。。。
for str in This is a stringdo
echo $str
done
挨个儿输出了单词