Skip to content

Instantly share code, notes, and snippets.

@johnmurch
Created September 14, 2016 12:59
Show Gist options
  • Save johnmurch/2ddaacc21d38a552790b9c039771a781 to your computer and use it in GitHub Desktop.
Save johnmurch/2ddaacc21d38a552790b9c039771a781 to your computer and use it in GitHub Desktop.
Merge error and log files into 1 file
#!/bin/bash
tail -n +1 file1.txt file2.txt file3.txt >> log.txt
#==> file1.txt <==
#<contents of file1.txt>
#==> file2.txt <==
#<contents of file2.txt>
#==> file3.txt <==
#<contents of file3.txt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment