- 论坛徽章:
- 769
|
本帖最后由 Herowinter 于 2014-07-28 08:22 编辑
回复 5# ahdong2007
1. info sed,一般info的资料比较全,我这里英文版的,你可以看一下自己的。- `FIRST~STEP'
- This GNU extension matches every STEPth line starting with line
- FIRST. In particular, lines will be selected when there exists a
- non-negative N such that the current line-number equals FIRST + (N
- * STEP). Thus, to select the odd-numbered lines, one would use
- `1~2'; to pick every third line starting with the second, `2~3'
- would be used; to pick every fifth line starting with the tenth,
- use `10~5'; and `50~0' is just an obscure way of saying `50'.
复制代码 2. 每一个awk代码块的结果可以分为两块,大概这样的: 条件{行为}
当其中某一部分缺失时,用默认条件或默认行为,默认的条件是true,默认的行为
是print $0;代码最后写了个1就是省略了行为的写法,条件是1(true),行为是
默认行为,以前论坛有个讲这个帖子的,一下子找不到。
|
|