[Shell]For大括号{}

1. Shell for循环跳跃不连续数

for i in {"172.15.7."{101..106},"172.15.7."{109..111},"160.168.103."{191..192}};do ssh ${i} "date";done
# 进一步整合
for i in {"172.15.7."{{101..106},{109..111}},"160.168.103."{191..192}};do ssh ${i} "date";done

END

posted @ 2021-10-21 08:17  LeoShi2020  阅读(75)  评论(0编辑  收藏  举报