随笔分类 -  shell

摘要:一.shell中quotes的类型 1.backslash \ 2. single quotes' ' 3.double quotes " " 4. back quotes ` `*The back quote isnotused for quoting characters. That character is used for command substitution, where the characters between them are executed by the shell and the results is inserted on th 阅读全文
posted @ 2013-04-16 14:42 舟乍舟孟 阅读(687) 评论(0) 推荐(0)
摘要:~$ cat test.txt1xxy> xyy> xyy> xyxyxy> a> c> ~$ let value=`cat test.txt | tr -d '>' | tr -d ' ' | tee file.tmp| wc -l `-1 ; head -n $value file.tmp > test.txt1; rm file.tmp~$ cat test.txt1xxyxyyxyyxyxyxyac对文本test.txt1进行处理去除>符号 去除' '空格 然后存入源文件注意点:(1) 阅读全文
posted @ 2013-04-12 22:19 舟乍舟孟 阅读(154) 评论(0) 推荐(0)