|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/doc/mgetty-1.1.33/samples/ |
Upload File : |
#!/bin/sh
#
# make.coverpg -- simple version, use pbmtext (crude, but good example)
#
# Author: gert@greenie.muc.de
#
# Syntax:
# make.coverpg <pages> <sender-ID> <sender-NAME> <receiver-ID>
# <receiver-NAME> <date> <time>
#
#
# if called with "-m <memo-file>", put that file on cover page:
MEMO=""
if [ X$1 = X-m ] ; then
MEMO=$2
shift ; shift
fi
#
# select font according to resolution
if [ X$normal_res = X ]
then
font=/usr/local/lib/mgetty+sendfax/cour25.pbm
else
font=/usr/local/lib/mgetty+sendfax/cour25n.pbm
fi
tmp=/tmp/coverpg.$$
#
# standard part of page
#
cat << EOF >$tmp
+----------------------------------------+
| T E L E F A X ---- M E S S A G E |
+----------------------------------------+
Sender: $3
Fax: $2
Receipient: $5
Fax: $4
Pages (incl. cover page): $1
Date fax created: $6 $7
Fax-Software used: mgetty+sendfax 1.1.10
EOF
#
# if desired, attach MEMO file
#
if [ ! -z "$MEMO" ] ; then
echo " Message:" >>$tmp
echo "" >>$tmp
sed -e 's/^/ /' -e '40,$d' $MEMO >>$tmp
fi
#
# now make G3 file -> stdout
#
cat $tmp | pbmtext -font $font | pbmtog3
rm -f $tmp