Linux command to find a specific line in file and add new lines below it -
i trying build linux command find line in file , add more lines below line. example search "application"
in file, line word , add 3 more lines below it. using absolute line number in "sed -i '51icolumn1, column2, column3' test.txt"
if change in file might adding text in wrong place.
would
sed -i '/application/a column1, column2, column3\ncolumn1, column2, column3' test.txt
solve issue?
Comments
Post a Comment