Created
November 13, 2013 14:23
-
-
Save nejo/7449904 to your computer and use it in GitHub Desktop.
File Unifier
This file contains hidden or 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
| #!/bin/bash | |
| FILENAME='unified/MERGED_FILENAME.txt' | |
| `rm $FILENAME` | |
| `touch $FILENAME` | |
| FILES2012=`ls files/ | grep -E "FILENAME2012[0-9]{1,}\.txt"` | |
| for file in $FILES2012; do | |
| cat "files/$file" >> $FILENAME; | |
| done | |
| FILES2013=`ls files/ | grep -E "FILENAME2013[0-9]{1,}\.txt"` | |
| for file in $FILES2013; do | |
| cat "files/$file" >> $FILENAME; | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment