Last active
September 10, 2018 13:54
-
-
Save boyswan/7b62484f5cee657fe79fb2003fbd46ce to your computer and use it in GitHub Desktop.
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 | |
IFS=$';' | |
for i in {3,5,9,17,33,65,129} | |
do | |
query=$(sqlite3 "/Users/jackboyce/Library/Application Support/Ableton/Live Database/Live-files-32.db" "SELECT _rowid_,* FROM main.files WHERE colors = $i") | |
copyFile () { | |
while read data; do | |
mkdir -p $i | |
find /Users/jackboyce/Samples -name $data -type f -exec cp {} ./$i \; | |
done | |
} | |
echo $query | xargs -L 1 bash -c 'echo "$0 $1 $2 $3 $4 $5" | cut -d "|" -f9' | copyFile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment