使用输出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删除。