Skip to content

Instantly share code, notes, and snippets.

@louisswarren
Created February 6, 2023 02:00
Show Gist options
  • Save louisswarren/b1d4f8a5592bc7f98d16b887ddee1fbc to your computer and use it in GitHub Desktop.
Save louisswarren/b1d4f8a5592bc7f98d16b887ddee1fbc to your computer and use it in GitHub Desktop.
Vet which media files to copy
#!/bin/sh
vet() {
echo "Playing $1"
mpv --no-audio-display "$1"
read x
if [ "$x" == "y" ]; then
cp -v "$1" "$2/"
else
echo "Skipping $1"
fi
}
export -f vet
vetf='vet "$0"'
find "$1" -name '*.mp3' -exec sh -c "$vetf '$2'" {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment