#!/bin/sh # # sample script to automatically convert incoming faxes to gif, uuencode # them, and send them to "MAILTO". # # Original Script: gert@greenie.muc.de # # MAILTO="tkruse@gix.sforce.org" MAILER=/usr/lib/sendmail PATH=$PATH:/usr/local/bin G3TOPBM=g32pbm # # HUP="$1" SENDER="$2" PAGES="$3" shift 3 P=1 while [ $P -le $PAGES ] do FAX=$1 RES=`basename $FAX | sed 's/.\(.\).*/\1/'` if [ "$RES" = "n" ] then STRETCH="-s" else STRETCH="" fi ( echo "Subject: fax from $SENDER, page $P of $PAGES" echo "To: $MAILTO" echo "" $G3TOPBM $STRETCH $FAX \ | ppmtogif \ | uuencode `basename $FAX`.gif ) | $MAILER $MAILTO shift P=`expr $P + 1` done exit 0 Linux/68k 2.0 - Linux in der praktischen Anwendung - 2 / 3
|  |  | # 60