追加(行下):a\命令 % _) ^" h3 a/ q7 o8 F0 j. L
将 this is a test line 追加到 以test 开头的行后面: + l& X# J x; e3 ?7 ~( p$ I sed '/^test/a\this is a test line' file 1 t9 t- Z8 {! z" T# K在 test.conf 文件第2行之后插入 this is a test line: $ J7 [: U# W1 Z/ ~sed -i '2a\this is a test line' test.conf