From 2221671b95c008a48673a1c2907516c8a694bb33 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Sat, 24 Aug 2019 08:55:16 +0000 Subject: [PATCH] fixed naming issue --- transcode_music.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/transcode_music.sh b/transcode_music.sh index 274bde3..27180f3 100755 --- a/transcode_music.sh +++ b/transcode_music.sh @@ -15,8 +15,8 @@ if [ "ffprobe -show_format 2>/dev/null $d | grep bit_rate | cut -d'=' -f2" > 192000 ]; then echo in $d echo out "trans_music/$(echo ${d%.*} | cut -f1 -d'/' --complement).mp3" - ffmpeg -i "$d" -b:a $bitrate "trans_music/$(echo $d | cut -f1 -d'.' | cut -f2,3,4,5 -d'/').mp3" + ffmpeg -i "$d" -b:a $bitrate "trans_music/$(echo ${d%.*} | cut -f1 -d'/' --complement).mp3" else - cp "$d" "trans_music/$(echo $d | cut -f2,3,4,5 -d'/')" + cp "$d" "trans_music/$(echo $d | cut -f1 -d'/' --complement)" fi done -- Gitblit v1.9.3