日期:2014-05-16 浏览次数:20870 次
sed编辑器–Stream editor(流编辑器),相对于交互式编辑器如vim无法进行人工交互,需要根据在编辑器处理数据之前事先提供的规则集编辑数据流。
Usage: sed [OPTION]… {script-only-if-no-other-script} [input-file]…
-n, –quiet, –silent
suppress automatic printing of pattern space
-e script, –expression=script
add the script to the commands to be executed
-f script-file, –file=script-file
add the contents of script-file to the commands to be executed
–follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], –in-place[=SUFFIX]
edit files in place (makes backup if extension supplied)
-l N, –line-length=N
specify the desired line-wrap length for the `l’ command
–posix
disable all GNU extensions.
-r, –regexp-extended
use extended regular expressions in the script.
-s, –separate
consider files as separate rather than as a single continuous