linux shell脚本写循环结构

例子(Demo):


x=10

for _ in 1 2;do
# for _ in 1 2;do

for i in 1 2 3 ;
do
    for j in 4 5 6;
        do echo "${i} ${j}" &&
                echo "xyz_${i} ${j}"
    done
done
 

x=20

echo "/home/xyz ${x}"

done


运行情况:


image



posted on 2025-01-08 21:21  Angry_Panda  阅读(3)  评论(0编辑  收藏  举报

导航