I have a file test.txt. It has 120 lines in it. I want to add on line 70 a new line "test" so I get:
test.txt
line 68 line 69 test line 70 line 71
How can I do it in one line command without using text editors such as vim?
sed -i '70i test' test.txt
is what you need to enter.