LINUX shell编程2 命令
2014-03-17 15:10
316 查看
1 read:从键盘读入数据,赋给变量
cat read#i/bin/sh
read first second third
echo "the first parameter is $first"
echo "the second parameter is $second"
echo "the third parameter is $third"
# sh -x read
-x: 显示执行过程
2 expr:对整数型变量的算术运算
expr 3 + 5 (中间有空格)expr 3 \* 10 (乘法需要有转义符)
复杂运算:expr 'expr 5 + 7' / 7
相关文章推荐
- linux shell编程学习--循环流程while,for,until命令
- linux shell编程学习笔记(5)shell运算符号和运算命令
- linux shell编程指南第六章------命令执行顺序
- linux Shell编程--获取命令执行返回结果
- linux shell 编程笔记 - 后台执行命令crontab
- linux shell编程 trap命令
- Linux简介及常用命令使用5--linux shell编程入门
- Linux shell编程之sed命令之二
- Linux Shell编程(20)——基本命令
- Linux Shell编程(20)——基本命令
- linux shell编程学习--test测试比较命令
- Linux Shell编程(21)——复杂命令
- Linux shell编程之循环控制命令 break、continue
- Linux Shell编程(21)——复杂命令
- Linux shell编程之sed命令之一
- Linux Shell 编程 1 chmod命令详解
- Linux Shell编程(22)——时间/日期 命令
- linux shell编程 trap命令
- linux shell编程指南第三章------后台执行命令
- Linux Shell编程中的几个特殊符号命令 & 、&& 、 ||