Shell script 初探
来源:互联网 发布:ubuntu下载安装jdk1.7 编辑:程序博客网 时间:2024/05/20 15:10
1. #!/bin/sh
2.# as comment
3.echo as print
4.variable neednt statement,directly use ,like a = '123' echo $a
5.the special print : echo ${a}bc ----the result is 123bc . echo $abc will print null..... because cant find variable abc.
6.awk use for abstract field from txt file . -F as its option
7.管道、重定向&backtick
8.example:
#!/bin/sh
echo "what os is you favorite?"
select var in "linux" "ubuntu " "windows" "mac os" "others" ;
do
break
done
echo "you have selected ${var}os"
/////有的可能会出错,将sh 改为bash ,执行脚本命令改为bash or ./yourfilename.
9.export 命令
复制功能,或者说转换作用域。
10.shell python : 以空格作为代码块控制。
11.shell中变量设置有多种不同模式。http://www.uuxiao.com/diary_show.asp?id=530
12.http://www.tutorialspoint.com/unix/unix-special-variables.htm
link:http://linux.chinaunix.net/doc/system/2005-02-03/1083.shtml
link:http://blog.chinaunix.net/uid-9078183-id-2436460.html
- Shell script 初探
- shell Script
- shell script
- Shell script
- shell script
- shell script
- shell script
- shell script
- shell script
- shell script
- shell script
- shell script
- Shell Script
- shell script
- shell script
- shell script
- shell script
- shell script
- 快速搭建一个SSH框架
- PLSQL中显示Cursor、隐示Cursor、动态Ref Cursor区别
- hanoi双塔
- 分布式和集中式版本控制工具-svn,git,mercurial比较分析
- 老码农教你学英语
- Shell script 初探
- 新人该如何对待工作
- CODE 143:LRU Cache
- 影响一生的职业建议
- 第二十四节 表达式计算器(2)
- 福州大学 2020组合 Lucas算法求解逆元的介绍
- Java 强引用和弱引用以及其它引用
- Direct3D中的2D
- 高斯消元法,高斯约旦消元法