Created
November 7, 2014 22:28
-
-
Save jeffjohnson9046/aa7b24d83144dcaae491 to your computer and use it in GitHub Desktop.
Sort a List of Files and Cat Them Together
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
# The command below will take a list of files in the current directory, sort them and cat them together into a single file. | |
# The files against which this command was initially used were all named using the following convention: | |
# | |
# V[some number]__[the name of the file].sql | |
cat `ls -1 *.sql | sort -k1.2n` > /tmp/migration.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment