Analytic

Wednesday, November 5, 2014

Add line to the beginning of a file in Bash

To add a line to the beginning of a file, use this command: 
 
sed -i '1s/^/YOUR NEW LINE\n/' YOUR-FILE.TXT

No comments: