Or even simpler
Code:
id=`calibredb add /t/test.html --dont-notify-gui | tail -n1 | cut -d: -f2`
calibredb add_format $id someotherformat.epub
And in case you dont want to use --dont-notify-gui
Code:
id=`calibredb add /t/test.html | tail -n2 | head -n1 | cut -d: -f2`
calibredb add_format $id someotherformat.epub