From 451b5e613bc3194869a8974ed63f4e85b3e132a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 24 Nov 2020 01:33:30 +0100 Subject: Add 'flt' (filter out) tool --- flt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 flt (limited to 'flt') diff --git a/flt b/flt new file mode 100755 index 0000000..88797be --- /dev/null +++ b/flt @@ -0,0 +1,11 @@ +#!/bin/sh + +# Filter out existing tracks + +tmp=/tmp/flt.$RANDOM +find "$@" -type f -name '*.mp3' | +xargs -I {} basename -s.mp3 "{}" | +sed 's/\(.*\) - \(.*\)/\2\t\1/' > $tmp + +fgrep -vf $tmp +rm $tmp -- cgit v1.2.3