Skip to content

Instantly share code, notes, and snippets.

@jaybaker
Created October 6, 2019 20:03
Show Gist options
  • Save jaybaker/9f0f4f57d604b270f3c9f7597c04e58f to your computer and use it in GitHub Desktop.
Save jaybaker/9f0f4f57d604b270f3c9f7597c04e58f to your computer and use it in GitHub Desktop.
# concat files but just keep header from first file
awk '
FNR==1 && NR!=1 { while (/^header/) getline; }
1 {print}
' file*.txt >all.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment