SyntaxFix
Write A Post
Hire A Developer
Questions
sed -i '8i8 This is Line 8' FILE
inserts at line 8
8 This is Line 8
into file FILE
-i does the modification directly to file FILE, no output to stdout, as mentioned in the comments by glenn jackman.
-i