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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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