# 在每一行后面增加一空行 sed G # 将原来的所有空行删除并在每一行后面增加一空行。 # 这样在输出的文本中每一行后面将有且只有一空行。 sed '/^$/d;G' # 在每一行后面增加两行空行 sed 'G;G' # 将第一个脚本所产生的所有空行删除(即删除所有偶数行) sed 'n;d' ...
If you are a developer, or system administrator, or database administrator, or IT manager, or just someone who spends a significant amount of time on UNIX / Linux, you should become proficient in Sed and Awk. Sed and Awk are two great utilities that
prompt$ sedsed --help usage: sedsed OPTION [-e sedscr ipt] [-f sedscr iptfile] [inputfile] OPTIONS: -f, --file add file contents to the commands to be parsed -e, --expression add the scr ipt to the commands to be parsed -n, --quiet suppress automati