From 3882ac7a8cf46f05b6d046beda607a9099a56a21 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 24 Feb 2023 15:07:41 +0300 Subject: [PATCH] Add `cat-playlists` Add a script to concatenate playlists from subdirectories. --- audio/cat-playlists | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 audio/cat-playlists diff --git a/audio/cat-playlists b/audio/cat-playlists new file mode 100755 index 0000000..cd18eac --- /dev/null +++ b/audio/cat-playlists @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +find . -mindepth 1 -type d -printf '"%P"\n' | sort | sed 's/`/\\`/' | +xargs -I% -n1 sh -c \ + 'test -f "%"/PlayList.m3u && cat "%"/PlayList.m3u | sed -e "s\^\%/\\"' \ +> PlayList.m3u -- 2.39.5