bash insert to file in line 10 code example Example: insert a line at a line number sed sed -i '8i8 This is Line 8' FILE 8 This is Line 8