shell脚本(随笔)
2016-06-21 17:06
435 查看
if [ -n $string ] 如果string非空,返回true;
if [ int1 -ne int2 ] 如果不等于
shift $2 参数向左传递
$(cd "$(dorname $0)"; pwd) 当前文件所在目录
`basename ${x}`
if [ -f file ] 如果文件存在且是普通文件
if [ -e file ] 如果文件存在
notify-send string; 系统通知
/dev/null 写入它的内容都会丢失,读取返回空
$0 脚本本身文件
mutt 邮件客户端
make -c dir -f Makefile.am -c 切换到指定目录; -f 指定makefile文件
echo "hello" >> /etc/a.test 写入文件
echo "hello" > /etc/a.test 写入并覆盖
if [ int1 -ne int2 ] 如果不等于
shift $2 参数向左传递
$(cd "$(dorname $0)"; pwd) 当前文件所在目录
`basename ${x}`
if [ -f file ] 如果文件存在且是普通文件
if [ -e file ] 如果文件存在
notify-send string; 系统通知
/dev/null 写入它的内容都会丢失,读取返回空
$0 脚本本身文件
mutt 邮件客户端
make -c dir -f Makefile.am -c 切换到指定目录; -f 指定makefile文件
echo "hello" >> /etc/a.test 写入文件
echo "hello" > /etc/a.test 写入并覆盖
相关文章推荐
- centos -bash-4.1$
- adb shell出错“error: unknown host service”
- linux shell 去重 uniq和sort的区别
- shell if语句中的参数
- linux shell 去掉文本处理中的双引号
- linux shell 去掉文本处理中的空行
- Advanced Bash-Scripting Guide
- linux shell文本模式下echo显示满屏三色(红绿蓝)
- shell 笔记
- Shell 命令大全Xhell入门
- -bash: ./bin/start.sh: /bin/bash^M: bad interpreter: No such file or directory 问题
- linux常用shell
- 使用 PowerShell 自动化 CloudServices 发布
- 使用 PowerShell 自动化 CloudServices 发布
- 【shell】while与until循环
- 使用 PowerShell 自动化 CloudServices 发布
- Linux Shell 语法日志
- 【shell】 for循环
- HBase Shell命令
- shell脚本的基本算法编程