linux shell 指令好记速查
来源:互联网 发布:matlab 网络仿真 编辑:程序博客网 时间:2024/05/17 01:30
1.访问变量要加$
a=100
echo $a
2.read a #将用户输入内容放入a
3.参数
$0 脚本名字,$# 参数个数,$$ shell脚本进程号,$1...$n 具体参数
$*,$@ 全部参数,前者以$IFS分隔
4.test或者[]
if test -f xxx.c;then #or [ -f xxx.c ]
...
fi
5.if [cond0] || [cond1] && [cond2];then elif else fi
6.for i in ... do ... done
7.while cond do ... done
8.until cond do ... done
9.case val in
cond1_a | cond1_b) ...;;
cond2)...;;
esac
10.多个语句 {}
11.函数 foo() {local xxx = xxx;return xxx}
12.break,continue,
13, :号 , true的别名
14. 符号.在当前shell中执行命令
15.对参数求值 eval
16.exec将当前shell换为其他程序
17.expr将参数作为表达式求值
18.set|unset为shell设置|删除参数变量
19.shift将所有参数左移一位
20.trap信号处理
21.find [path] [options] [tests] [actions]
22.$()|``将命令以字符串方式返回
23.$((...)),${}参数扩展
24.$?上一命令的退出状态
- linux shell 指令好记速查
- linux shell指令
- Linux shell 指令
- linux shell (终端)指令
- Linux Shell 常见指令整理
- Linux Shell自定义快捷指令
- Linux Shell 常用指令示例
- Linux Shell自定义快捷指令
- LINUX下常用SHELL指令
- 嵌入式linux常用shell指令
- Linux shell read指令学习
- LINUX下常用SHELL指令
- linux shell 和 基本指令
- LINUX下常用SHELL指令
- <Linux shell>Linux常用的几个指令
- Linux Shell自定义快捷指令
- linux基本命令-shell内部指令
- Linux shell 脚本中的归档指令
- 颜色 16进制对照表
- [笔记] eclipse3.7中有个根据wsdl生成webservice客户端的向导
- 修复/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 问题
- appcan的基本使用(原文地址http://www.xinxueqi.com/course/12191)
- 为AIX更新技术级别和服务包
- linux shell 指令好记速查
- Memcached命令列表(二)
- 杭电ACM题目分类
- 犯二的Xcode 之 Could not launch app - No such file or directory 错误
- contains与compareDocumentPosition方法详解
- windows下添加mysql服务
- Mini2440触摸屏程序分析
- More Effective C++读书笔记5
- android神奇的“FileNotFoundException”