this question has answer here:
i need insert command "new file" in test.txt file @ line number 4.
tried sed; can see changed file output, when again cat test.txt, changes gone.
sed "4i new file" /test.txt how can save changes?
sed '4i new file' test.txt > tmp && mv tmp test.txt
Comments
Post a Comment