1.资料搜集:
http://man.lupaworld.com/content/manage/ringkee/awk.htm
http://www.chinaunix.net/jh/24/691456.html
http://www.tsnc.edu.cn/default/tsnc_wgrj/doc/sed.htm
http://www.linuxsir.org/bbs/showthread.php?t=189620
2。VIM:
-
:s/foo/bar/g
- Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.
-
:%s/foo/bar/g
- Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
-
:%s/foo/bar/gc
- Change each 'foo' to 'bar', but ask for confirmation first.
-
:%s/\<foo\>/bar/gc
- Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
-
:%s/foo/bar/gci
- Change each 'foo' (case insensitive) to 'bar'; ask for confirmation.
- This may be wanted after using :set noignorecase to make searches case sensitive (the default).
-
:%s/foo/bar/gcI
- Change each 'foo' (case sensitive) to 'bar'; ask for confirmation.
- This may be wanted after using :set ignorecase to make searches case insensitive.