title_body: Command line extraction of metadata (title. author) from epub file I would like to use a command line program to extract the title of a book
  (possibly also other metadata) from its epub file and return it as a
  string.
  I am using Linux, but my guess is that the question makes sense in other
  environments, too.
  I expected to easily find a clear and simple answer by searching
  the web. But apparently that is not the case, or I am still too
  ignorant to recognize answers.
  The command could look like this
  getbookinfo -m title myfile.epub
  
  and would yield the title of the book found in the epub file.
upvoted_answer: exiftool can read (but not write) epub meta data. For example
  
  
    exiftool -T -Title main.epub