Skip to content

Instantly share code, notes, and snippets.

@dnunez24
Created September 13, 2016 22:07
Show Gist options
  • Save dnunez24/01775aec6713f46e7183792f3f4606e7 to your computer and use it in GitHub Desktop.
Save dnunez24/01775aec6713f46e7183792f3f4606e7 to your computer and use it in GitHub Desktop.
Prepend Header Row to Another File in Bash
head -n1 file-with-header.txt | cat - file-without-header.txt > tmp.txt && mv tmp.txt file-without-header.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment