Skip to content

Instantly share code, notes, and snippets.

@talison
Created September 21, 2009 21:07
Show Gist options
  • Save talison/190552 to your computer and use it in GitHub Desktop.
Save talison/190552 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Converts a document to a PDF file using
# unoconv and opens it with the evince viewer.
##
file=`basename $1`
dir=`dirname $1`
prefix=${file%.[^.]*}
outfile="${prefix}.pdf"
echo Generating $outfile
unoconv -f pdf $1
echo Opening $outfile
evince "${dir}/$outfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment