首页 > 系统服务 > 详细

shell parameter

时间:2017-03-21 10:44:20      阅读:236      评论:0      收藏:0      [点我收藏+]
#!/bin/bash
funWithParam(){
    echo "scname:$0"
    echo "The value of the first parameter is $1 !"
    echo "The value of the second parameter is $2 !"
    echo "The value of the 100th parameter is $100 !"
    echo "The value of the 10th parameter is ${10} !"
    echo "The value of the 11th parameter is ${11} !"
    echo "The amount of the parameters is $# !"
    echo "The string of the parameters is $* !"
    echo "show process id:$$"
}
echo "input numbers:1 2 3 4 5 6 7 8 9 34 73"
funWithParam 1 2 3 4 5 6 7 8 9 34 73

技术分享

 

shell parameter

原文:http://www.cnblogs.com/xxdfly/p/6592934.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!