作业帮 > 英语 > 作业

for name啥意思

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:英语作业 时间:2024/05/16 20:00:01
for name啥意思
for name啥意思
然后以此执行for内部的循环体.举例说明:
假定如下代码
eth="eth0 eth1 eth2"
for name in $eth
do
echo "this is $name"
done
运行后的结果就是
this is eth0
this is eth1
this is eth2
echo "this is $name" 被执行了三次,每次执行时name变量依次是eth变量所记录单词中的一个