MAC 下的简单 SHELL 入门
生活随笔
收集整理的這篇文章主要介紹了
MAC 下的简单 SHELL 入门
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、創(chuàng)建文件 .sh 文件
本例,將 sh 文件全名為 demo.sh,接下來使用任意熟悉的編輯器編輯命令即可
2、編寫 .sh 文件
#!/bin/sh echo +----------------------------------------------------------+ echo + A tools for post csdn blogs and input the key as fllow: + echo + digg [Digg all blogs] + echo + views [view all blogs] + echo + read id [read one blogs] + echo + exports [exports all blogs] + echo + publish filename [publish blogs] + echo + publishes filename [bat publish blogs] + echo + login account password [login csdn] + echo +----------------------------------------------------------+ printf "Input your order which num is contained on above:" read order php do.php $order3、執(zhí)行 sh 文件
執(zhí)行方式
./demo.sh不過,在這里,可能會提示無權(quán)限,這時需要修改一下文件的權(quán)限即可,命令為
chmod 777 run.sh總結(jié)
以上是生活随笔為你收集整理的MAC 下的简单 SHELL 入门的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PHP通过计算经纬度获取附近的数据信息
- 下一篇: Your PC needs to be