faxspool accept stdin?
Gert Doering (gert@greenie.muc.de)
Wed, 26 Jan 2000 21:12:11 +0100
Hi,
On Wed, Jan 26, 2000 at 02:40:43PM -0500, Russell Nelson wrote:
> Anybody know why faxspool doesn't accept stdin? Here's my
> email-to-fax script:
>
> |perl -ne 'if (1../^$/) { s/nelson-fax-(.*)\@desk\.crynwr\.com/$1/ if /^To:/;print if /^(Date|From|To|Subject):/ or /^$/;} else { print }' >>/tmp/$$.txt;PATH=/usr/local/bin:$PATH /usr/local/bin/faxspool $EXT2 /tmp/$$.txt;X=$?;rm /tmp/$$.txt;exit $X
Actually, faxspool does accept stdin, but you have to tell it explicitely
about it, using "-":
$ banner hello | faxspool 123 -
spooling to /usr/spool/fax/outgoing/F000306...
spooling - (stdin)...
/tmp/faxsp.26266 is format: ascii
Aladdin Ghostscript 3.33 (4/10/1995)
Copyright (C) 1995 Aladdin Enterprises, Menlo Park, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading Courier-Bold font from /usr/local/lib/ghostscript/fonts/ncrb.pfa... 1770204 442431 1320152 27851 0 done.
Printing /tmp/faxsp.26266
Page height = 67.
...
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert@greenie.muc.de
fax: +49-89-35655025 gert.doering@physik.tu-muenchen.de