Skip to content

Instantly share code, notes, and snippets.

@louisswarren
Created February 6, 2023 02:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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