shell parameter

#!/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

 

posted @ 2017-03-21 09:57  薛晓东  阅读(242)  评论(0编辑  收藏  举报