Created
June 28, 2016 14:56
-
-
Save luiscape/5da2796b8d9a38cf60a4b6f0d4e3868c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file contains a shell script | |
# that will add a header to a TXT file | |
# without a header. Headers make it easier | |
# to navigate files. We like them. | |
# | |
# Original solution by: http://stackoverflow.com/questions/13402809/insert-a-line-in-csv-file | |
# | |
FILE=file_without_header.txt | |
sed -i.bak 1i"HEADER1,HEADER2,HEADER3" \ | |
$FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment