MAC 下的简单 SHELL 入门
2015-12-31 07:56
701 查看
1、创建文件 .sh 文件
本例,将 sh 文件全名为 demo.sh,接下来使用任意熟悉的编辑器编辑命令即可2、编写 .sh 文件
[code]#!/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 $order
3、执行 sh 文件
执行方式[code]./demo.sh
不过,在这里,可能会提示无权限,这时需要修改一下文件的权限即可,命令为
[code]chmod 777 run.sh
相关文章推荐
- Babun, Great Windows Shell
- HBase 常用Shell命令
- 如何用shell脚本监控服务器负载、cpu、内存、硬盘和登录用户数
- chapter11:认识与学习bash之(2)Bash Shell的操作环境
- chapter11:认识与学习bash之(1)认识shell与shell的变量功能
- shell脚本如何批量备份数据库
- Shell脚本使用TinyPng批量压缩图片
- adb shell 是这个啥东东
- 常用linux shell脚本记录
- ubuntu环境下的用户添加 - 指定用户shell
- shell脚本学习(五)
- shell脚本的一些基础知识
- 使用 adb shell 抓取 Android 性能数据
- Linux shell的标准输入、输出和错误
- 设置某个shell文件,以bash方式执行
- Linux shell 之 提取文件名和目录名的一些方法
- 命令 与 bash shell脚本
- shell 并发多进程同时执行
- ubuntu基本的shell命令
- ubuntu基本的shell命令