Fix two bugs in booksplit script

This commit is contained in:
VasylTyshchuk 2022-07-21 19:54:59 +03:00
parent 946f2c4d1e
commit 3d45242d9b

View File

@ -9,7 +9,7 @@ echo "Enter the artist/author:"; read -r author
echo "Enter the publication year:"; read -r year echo "Enter the publication year:"; read -r year
inputaudio="$1" inputaudio="$1"
ext="${1#*.}" ext="${1##*.}"
# Get a safe file name from the book. # Get a safe file name from the book.
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"