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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -