1 #通过命令行来传递脚本中for循环列表参数 2 #!/bin/bash 3 4 echo "number of arguments is $#" 5 6 echo "What you input is " 7 8 #通过命令行来传递脚本for循环的参数列表 9 for argument in "$*" 10 do 11 echo "$argument" 12 done 执行结果 [ ]$ ./forargument.sh 12 34 "love" number of arguments is 3 What you input is 12 34 love
for循环参数列表通过命令行读入
原创
©著作权归作者所有:来自51CTO博客作者Annjeff的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:case语句实现数字对应月份
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
AutoHotkey 通过命令行获得传递参数parameters command access dos menu
-
夜神模拟器Nox.exe支持命令行参数列表
Nox目前支持的命令行参数(支持3.0版本模拟器以及更高版本模拟器
模拟器 虚拟按键 自定义 竖屏