linux shell 2
来源:互联网 发布:java utf8编码转换gbk 编辑:程序博客网 时间:2024/05/29 18:16
Shell基础
1、 脚本命名
*.sh
2、 命名变量
1)自定义变量:
name=zhangsan
2)#env
大写字母
3)$
#echo $name
#echo $PATH
4)作用域
默认自定义变量—局部
通过调用多个shell进程
打开shell---父
再次打开shell---子
Shell----------子
#env
SHLVL==shell level
#export
5){}
#Name=zhansan
#echo {$name}isastudent
6) > >> 输出
< << 输入
〈〈:制定终止的符号
#cat < &0 表示接受来自键盘的输入
#cat < file 表示接受来自文件的输入
at <file -m
系统在接受输入输出内容存在方向
输入输出描述符:
输入:键盘 0
输出:屏幕 1
错误输出:分离 2
临时符号---起过渡作用3-9
/dev/null----虚拟出来的一个设备(黑洞)
LS 3<&2 3>file ????
7)read ---从键盘读取变量的值
注意当变量的数量和值得数量不一致的情况
#read 变量名
8)常见参数
$?-----表示显示最近一条命令的执行状态
状态分类:
退出状态0:表示成功
退出状态1:表示失败
- linux shell 2
- Linux shell 2
- linux shell编程2
- linux shell 2-----常用命令
- linux ---- Shell ---- 2
- Linux Shell基础知识2
- Linux-shell基础-2
- linux shell(2)
- Linux shell命令2
- Linux shell编程 2 ---- shell变量
- Linux & Shell (2) Write basic shell scripts
- Linux Shell 学习笔记2:Shell变量
- Linux shell 2 - 别名, shell函数
- Linux Shell编程入门 (2
- linux shell 学习笔记2
- linux shell编程基础2
- linux总结-------BASH Shell(2)
- Linux Shell学习笔记2
- windows远程linux(centOS 5.6)
- 新编Base64
- QT 按键1
- 项目规划管理 - 7 (全文完)
- qt 按键0
- linux shell 2
- 黑马程序员——Java IO总结(三)
- 关于u-boot中的.balignl 16,0xdeadbeef的理解
- 使用BASE64压缩byte[]到GSON
- 双网卡虚拟机设置
- nfs安装
- json安全输出解决方案
- 使用外部数据创建DirectFB Surface
- javascript调用c#生成的dll