Originally Posted by nimblebooks
I am having some trouble escaping the spaces in command line title when using a bash variable.
where I have
ebook-convert ... foo.epub ... --title$seed
or ebook-convert ...--title'$seed'
or ebook-convert ...--title"$seed"
where $seed="Adam Hall"
I am getting, respectively, title as
in other words, it is dropping off everything after the space. What am I doing wrong?
This is from a recent working script (but for
a different operation). It needed to work with
my ebooks, so there's some crossover to it.
# CLOSE ! CLOSE / ---bin--/---sh---
Standard shell above, I mangled it in case the
forum doesn't approve.
for index in \
"For Whom The Bell Tolls.azw" \
"Saved By The Bell.azw" \
"The Ball of the Bell.azw"
## uncomment the following line when the echo (above) looks good.
## $PYTHONBIN $KMDR "$INFILE" $OUTDIR
I don't have my Calibre system at-hand so I cannot run additional tests.
EDIT: I tested the essentials. I didn't find any problem,
or other reason to edit this post to correct it further.
The mechanism is valid, but remember the shell and
a shell script are two different (but similar) environments.
...I'm pretty sure the above was from a working script. I know a script worked last month, and I think the above script is the one that worked (before I simplified it for use in this post).