追加(行下):a\命令 $ h' g$ M" e0 X7 P
将 this is a test line 追加到 以test 开头的行后面:6 V8 v$ f9 f7 d4 p0 [; K8 q) {& j
sed '/^test/a\this is a test line' file 8 n7 ^3 ?1 U& O1 ~2 b
在 test.conf 文件第2行之后插入 this is a test line: ' T) F& t5 b; w0 U, L! Q
sed -i '2a\this is a test line' test.conf