Just curious -- is there a reason you use find and while read line, instead of "for file in *.mobi"
And instead of
Code:
fullfilename=${0##*/}
filename="${fullfilename%.*}"
you can use
Code:
filename="$(basename $0)"
And
Code:
test -e "$convertpath" || mkdir "$convertpath"
could be changed to
Code:
mkdir -p "$convertpath"