Use proper indexes for input arguments
This commit is contained in:
@@ -25,20 +25,14 @@ if [ -z "$2" ]
|
|||||||
then
|
then
|
||||||
echo "staying in current directory"
|
echo "staying in current directory"
|
||||||
else
|
else
|
||||||
if [ "$2" = "-l" ]
|
if [ "$1" = "-l" ]
|
||||||
then
|
then
|
||||||
if [ -z "$3" ]
|
echo "Looping through $3"
|
||||||
then
|
while read flacfile; do
|
||||||
echo "Please provide the location of the file with multiple entries to fix"
|
echo "Processing line $flacfile"
|
||||||
exit 1;
|
fix_flac_file "$flacfile"
|
||||||
else
|
done < "$3"
|
||||||
echo "Looping through $3"
|
exit 0;
|
||||||
while read flacfile; do
|
|
||||||
echo "Processing line $flacfile"
|
|
||||||
fix_flac_file "$flacfile"
|
|
||||||
done < "$3"
|
|
||||||
exit 0;
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "moving to $2"
|
echo "moving to $2"
|
||||||
cd "$2"
|
cd "$2"
|
||||||
|
|||||||
Reference in New Issue
Block a user