Skip to content

Instantly share code, notes, and snippets.

@hrickards
Created June 6, 2017 14:49
Show Gist options
  • Save hrickards/3b7ca53abfb83bbc1d850a7adad0f514 to your computer and use it in GitHub Desktop.
Save hrickards/3b7ca53abfb83bbc1d850a7adad0f514 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
OUTFILE=etranscript.pdf
PRINTDIR=/private/var/spool/cups
NRUSER=$(whoami)
sudo -E bash -c "
PRINTFILE=\$(ls -Atr $PRINTDIR/d* | tail -n 1)
pstopdf \$PRINTFILE -o $OUTFILE
chown $NRUSER: $OUTFILE
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment