使用輸出hello world!為例。
1、制作shell腳本,並賦予執行權限
cd ~/Desktop touch test.sh vim test.sh(輸入 echo "hello world!" ) chmod 755 test.sh ./test.sh
輸出:hello world!
2、制作可雙擊執行的腳本
只需將后綴sh改成command
cp test.sh test.command
3、雙擊command腳本
輸出:hello world!
使用輸出hello world!為例。
cd ~/Desktop touch test.sh vim test.sh(輸入 echo "hello world!" ) chmod 755 test.sh ./test.sh
輸出:hello world!
只需將后綴sh改成command
cp test.sh test.command
輸出:hello world!
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。