摘要: awk 多文件操作2种实现方法 我们经常会将2个有关联文本文件进行合并处理。分别从不同文件获取需要的列,然后, 整体输出到一起。awk进行多文件处理时候,常常会遇到2个方面问题,第一个是怎么样合并多个文件为一个文件。第二个问题就是怎么样将多行合并为一行显 示。我这里说下我的处理2种方法,还有实现思路 阅读全文
posted @ 2016-09-25 16:36 Big_Foot 阅读(679) 评论(0) 推荐(0)
摘要: 去除重复sort file |uniq 查找非重复 sort file | uniq -u 查找重复 sort file | uniq -d 统计 sort file | uniq -c 阅读全文
posted @ 2016-09-25 16:06 Big_Foot 阅读(4136) 评论(0) 推荐(0)
摘要: #root@athena5plus:~# cat b northwest NW Charles Main 3.0 .98 3 34 western WE Sharon Gray 5.3 .97 5 23 southwest SW Lewis Dalsass 2.7 .8 2 18 southern 阅读全文
posted @ 2016-08-08 19:35 Big_Foot 阅读(485) 评论(0) 推荐(0)
摘要: tt="1 10 17 10-134-9-154.xml" echo $tt 只是单纯地打印出tt保存的这些变量 cat $tt 则会对tt 中保存的变量文件挨个打印出来 阅读全文
posted @ 2016-07-26 16:57 Big_Foot 阅读(377) 评论(0) 推荐(0)
摘要: Infolist=($(du *))echo "Get the list one $Infolist"This has formed a array after quating the “()”。 Infolist=$(du *)echo "Get the two $Infolist"This is 阅读全文
posted @ 2016-07-26 16:26 Big_Foot 阅读(269) 评论(0) 推荐(0)
摘要: 是对文件中的每一行进行处理,不会对源文件进行修改 sed --version sed '11d' sed_file sed -n '/[Bb]erry/p' sed_file (由于设置了n,所以只打印出有Berry/berry的行) sed '/[Bb]erry/p' sed_file(没有设置n 阅读全文
posted @ 2016-07-03 17:01 Big_Foot 阅读(262) 评论(0) 推荐(0)
摘要: (1) 跳到首行 :1 或 gg (2)跳到最后一行 :$ 或 G 或shift+g(大写。当前若大小写锁定直接按g,未锁定则按shift+g) 阅读全文
posted @ 2016-07-01 10:04 Big_Foot 阅读(245) 评论(0) 推荐(0)
摘要: (1)Using let let result=2+1 let result=2-1 let result=2*1 let result=2/1(2) Using bracket echo $(($p1+$p2)) OR sum=$(($p1+$p2)) echo $sum(3) Using ` a 阅读全文
posted @ 2016-06-29 17:33 Big_Foot 阅读(260) 评论(0) 推荐(0)
摘要: (1) Source code #! /bin/bashreference () { pa=\$"$1" echo $pa x=`eval "expr $pa "` echo $1=$x local aaa=$x bbb=$x eval "$1='test been modified'" retur 阅读全文
posted @ 2016-06-29 16:57 Big_Foot 阅读(181) 评论(0) 推荐(0)
摘要: Under the /usr/src directory. 1.arch目录包括了所有和体系结构相关的核心代码。它下面的每一个子目录都代表一种Linux支持的体系结构,例如i386就是Intel CPU及与之相兼容体系结构的子目录。PC机一般都基于此目录。 2.include目录包括编译核心所需要的 阅读全文
posted @ 2016-06-24 17:34 Big_Foot 阅读(180) 评论(0) 推荐(0)