Quoth Ronald F. Guilmette on Thursday, 27 October 2011: > ============================================================================ > #!/bin/sh > > printer='/dev/ulpt0' > > if [ $# = 0 ]; then > cat | /usr/local/libexec/psif > $printer > else > for arg in $* ; do > cat $arg | /usr/local/libexec/psif > $printer > done > fi
Not to be a pedant (okay, maybe I am), but you could eliminate the extraneous `cat` in both commands: #!/bin/sh printer='/dev/ulpt0' if [ $# = 0 ]; then /usr/local/libexec/psif > $printer else for arg in $* ; do /usr/local/libexec/psif < $arg > $printer done fi Nice work, though! -- .O. | Sterling (Chip) Camden | http://camdensoftware.com ..O | sterl...@camdensoftware.com | http://chipsquips.com OOO | 2048R/D6DBAF91 | http://chipstips.com
pgpwEVMHl5Jyk.pgp
Description: PGP signature