View Single Post
Old 08-06-2015, 09:57 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Passing the entire command as one string to `eval` will allow it to be interpreted the way you would've expected. Of course, "eval is evil".

Code:
#!/bin/bash
id=10030
a='-f "authors:John Doe"'
t='-f "#translator:Jane Doe"'
eval calibredb set_metadata $a $t $id

Last edited by eschwartz; 08-06-2015 at 10:21 PM.
eschwartz is offline   Reply With Quote