Shell腳本學習筆記(五)--函數

函數 python Bash調用函數不會開啓新的子shell,會在現有的shell環境中執行該函數。 函數的語法形式:shell function 函數名稱() { 命令區域 } 函數名稱() { 命令區域 } function 函數名稱 { 命令區域 } 調用:函數名 參數1 參數2 .... FUNCNAME變量,值的內容是函數名 取消函數定義:unset -f 函數名 return
相關文章
相關標籤/搜索