diff options
author | John Ankarström <john@ankarstrom.se> | 2020-11-24 01:33:30 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-11-24 01:33:30 +0100 |
commit | 451b5e613bc3194869a8974ed63f4e85b3e132a4 (patch) | |
tree | 67b399a2c97465c6ced993295cee2170bd1e4cb5 | |
parent | 76503f761db72b91882ce497940534e28ffe421f (diff) | |
download | msc-451b5e613bc3194869a8974ed63f4e85b3e132a4.tar.gz |
Add 'flt' (filter out) tool
-rwxr-xr-x | flt | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |