#!/bin/bash # Copyright (C) 2005-2007 Michael Homer <=mwh> # Distributed under the GNU GPLv3+ and without warranty of any kind. MOUNTPOINT="/media/Twoflower"; filename=`date +'%Y%m%d%H%M%S'`.pdf cat /dev/null > /tmp/printing.ps while read line do echo $line >> /tmp/printing.ps done [ -e $MOUNTPOINT ] && dest=$MOUNTPOINT/$filename || dest=/tmp/$filename ps2pdf13 /tmp/printing.ps $dest notify $filename "Printed to $dest"