Created
May 30, 2014 10:47
-
-
Save martijngastkemper/39e448fcde307a438953 to your computer and use it in GitHub Desktop.
Search a file by version
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
#!/bin/bash | |
fromVersion=$1 | |
if [ -d .sql-update ] | |
then | |
start=false | |
for sqlFile in `ls -v .sql-update/*` | |
do | |
if [[ $sqlFile == *$fromVersion* ]] | |
then | |
start=true | |
fi | |
if $start | |
then | |
echo $sqlFile | |
fi | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment