- 论坛徽章:
- 15
|
本帖最后由 rdcwayx 于 2012-09-14 10:07 编辑
楼主你至少该找些经典的脚本来学,这种脚本走了不少弯路,还是少看为妙,小心走火入魔啊。
如果你实在要去理解,看一下帮助:
第一:- man grep
- -A NUM, --after-context=NUM
- Print NUM lines of trailing context after matching lines.
- Places a line containing a group separator (--) between
- contiguous groups of matches. With the -o or --only-matching
- option, this has no effect and a warning is given.
- -c, --count
- Suppress normal output; instead print a count of matching lines
- for each input file. With the -v, --invert-match option (see
- below), count non-matching lines. (-c is specified by POSIX.)
复制代码 第二, 看看sed的替换命令 s
第三,理解一下 ` ` 里放命令的用法。 |
|