$ 0 0 To append file2 to a specific line in file1, here is command: sed -i “<line>r file2″ file1 Example: