Quote:
Originally Posted by kovidgoyal
|
Thank You for this! That put me a huge step forward.

Where I am struggling is getting the ID and use the ID with shell script.
If I use that script, it works nicely:
Code:
#!/bin/bash
id=3149
a='-f "tags:Hegel"'
eval calibredb set_metadata "$a" "$id"
But now, to use as variable, I want to extract the id from $1 where $1 is the path to the metadata.opf file. Do you know how I could accomplish that? Is there a way to single out the ID from the metadata.opf and use it as $id within the calibredb command?