标签:linux shell
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
标签:linux shell
原文地址:http://11468437.blog.51cto.com/11458437/1862312