Skip to content

Instantly share code, notes, and snippets.

@joelataylor
Created September 11, 2012 23:27
Show Gist options
  • Save joelataylor/3702984 to your computer and use it in GitHub Desktop.
Save joelataylor/3702984 to your computer and use it in GitHub Desktop.
swift commands
#!/bin/bash
# The goal of this script is to remove mp3's that have already been processed
temp_file='/tmp/music-dup.txt'
comm -12 <(swift list 'audio-in' | sed 's/.mp3//') <(swift list 'audio-out' | sed 's/.ogg//') > $temp_file
while read -r line; do
echo "removing item: $line.mp3"
swift delete "audio-in $line.mp3"
done < $temp_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment