Shell函數參數

在Shell中,調用函數時能夠向其傳遞參數。在函數體內部,經過 $n 的形式來獲取參數的值,例如,$1表示第一個參數,$2表示第二個參數... 帶參數的函數示例: #!/bin/bash funWithParam(){ echo "The value of the first parameter is $1 !" echo "The value of the second parameter is
相關文章
相關標籤/搜索