the requirement is to add new content below a line
CentOS
related codes
sed-I"Nbat / Target text 1Universe a\ / / ancymocknreturn add new content 1" file_path
sed-I"Nbat / Target text 2Universe a\ / / ancymocknreturn add new content 2 "file_path
expected results
Target text 1
/ / ancymock
return new content 1
Target text 2
/ / ancymock
return new content 2
actual results
Target text 1
/ / ancymock
return new content 1
Target text 2
(with a blank line)
/ / ancymock
return new content 2
when the same sed logic is appended to the second target document, a jump line appears. Sometimes I really think rlgl