From 9f8dedf6f0f4fd9de8fa2bd88e887b2812d827c0 Mon Sep 17 00:00:00 2001 From: Sem Date: Mon, 20 Jul 2026 13:44:03 +0200 Subject: [PATCH] Use proper indexes for input arguments --- fix_unknown_album_and_artist_flac_file.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/fix_unknown_album_and_artist_flac_file.sh b/fix_unknown_album_and_artist_flac_file.sh index 5ec4cbe..fdd5bca 100755 --- a/fix_unknown_album_and_artist_flac_file.sh +++ b/fix_unknown_album_and_artist_flac_file.sh @@ -25,20 +25,14 @@ if [ -z "$2" ] then echo "staying in current directory" else - if [ "$2" = "-l" ] + if [ "$1" = "-l" ] then - if [ -z "$3" ] - then - echo "Please provide the location of the file with multiple entries to fix" - exit 1; - else - echo "Looping through $3" - while read flacfile; do - echo "Processing line $flacfile" - fix_flac_file "$flacfile" - done < "$3" - exit 0; - fi + echo "Looping through $3" + while read flacfile; do + echo "Processing line $flacfile" + fix_flac_file "$flacfile" + done < "$3" + exit 0; else echo "moving to $2" cd "$2"