nixos-config/scripts/mpdDup
2023-04-11 14:44:38 -03:00

6 lines
147 B
Bash
Executable file

#!/bin/sh
mpc playlist -f '%position%\t%file%' |
sort -k 2 |
perl -ne 'm/(.*)\t(.*)/; print "$1\n" if $2 eq $prev; $prev=$2' |
mpc del