Use proper indexes for input arguments

This commit is contained in:
Sem
2026-07-20 13:44:03 +02:00
parent 107230dce0
commit 9f8dedf6f0

View File

@@ -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
else
echo "moving to $2"
cd "$2"