shell學習21:函數(沒有參數傳遞)

 shell的函數比較簡單,和其餘語言同樣,使用前,必須定義好。shell 格式:bash function 函數名(){ 函數內容}函數 1 #!/bin/bash 2 # 3 file_name=b.txt 4 function FILE_EXIST() 5 { 6 if [ -f $file_name ] 7 then 8 echo
相關文章
相關標籤/搜索