From: Oleg Broytman Date: Fri, 24 Feb 2023 12:07:41 +0000 (+0300) Subject: Add `cat-playlists` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=inline;p=audio-cdr-video.git Add `cat-playlists` Add a script to concatenate playlists from subdirectories. --- 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