![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_00.jpg)
但在MAC底下,若要讓.sh可自動執行,就得手動設定.sh的檔案,透過 MAC 內建的終端機開啟,如此一來就可自動執行,至於要如何指定,現在就一塊來看看吧!
Step1
當不作任何設定,雙響.sh的檔案時,就會以文字編輯器將它開啟。
![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_01.jpg)
Step2
這時對著.sh檔案,按滑鼠右鍵選擇「其它」。
![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_02.jpg)
Step3
接著將 啟用設為「所有應用程式」,以及將「每次都用此應用程式打開」的選項勾起來,再選擇「終端機」後,按下「打開」。
![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_03.jpg)
Step4
當首次開啟,會出現取用同意框,接著按「好」。
![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_04.jpg)
Step5
接著就會開始執行,真的只能說.sh真的超方便的,就可以將一些繁索的指令寫成一份文件,再雙響就會直接
![梅問題-MAC 設定Shell Script(.sh)檔,指定終端機將它開啟並自動執行](https://photo.minwt.com/img/Content/mac/mac-openapp-sh/mac-openapp-sh_05.jpg)