追加(行下):a\命令 ! D3 K# q) S9 h2 E% Z/ B9 G8 A将 this is a test line 追加到 以test 开头的行后面: 9 \4 L0 E9 b6 S2 A3 E* i! C4 x sed '/^test/a\this is a test line' file x/ L5 J+ u4 l* i0 Y( X
在 test.conf 文件第2行之后插入 this is a test line: 1 V2 x8 w' E$ [" f" i* I+ B/ @sed -i '2a\this is a test line' test.conf