/usr/share/doc/mgetty/examples/fax is in mgetty-docs 1.1.36-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #!/bin/bash
#
# fax - interactive tool for creating fax memos
#
# relies on "faxmemo" being in the PATH and set up properly
#
echo=/usr/local/bin/mg.echo
input()
{
    if [ -z "$3" ] ; then
	$echo "$1: \c"
    else
	$echo "$1 [$3]: \c"
    fi
    read in
    out=${in:-$3}
    eval $2="\"$out\""
}
fax_phone=""
verbose_to=""
documents=""
while true ; do
ok=false
until $ok
do
    input "Fax-Nummer" fax_phone $fax_phone
    if [ -z "$fax_phone" ] ; then
	echo "Darf nicht leer sein" ; continue
    fi
    fax_phone=`echo $fax_phone | tr -d " 	"`
    ok=true
done
  
input "Empfaenger (opt)" verbose_to "$verbose_to"
ok=false
until $ok
do
    input "\nZu sendende Dokumente (wildcards erlaubt)" documents "$documents"
    if [ ! -z "$documents" ] ; then
      if ls $documents >/dev/null ; then : ; else
	echo "Dokumente nicht gefunden!"; continue
      fi
    fi
    ok=true
done
$echo "\nText fuer Titelseite eingeben... Editor wird gestartet..." ; sleep 1
ok=false
until $ok
do
    ed=${EDITOR:-vi}
    memo_file=/tmp/fax.$LOGNAME.$$
    $ed $memo_file
    lines=`wc -l <$memo_file | tr -d " "`
    if [ $lines -gt 18 ] ; then
	$echo "\n\nMemo-File zu lang (auf Deckblatt ist nur Platz fuer 18 Zeilen)"
	input "Nochmal <e>ditieren oder <a>bschneiden?" again e
	test "$again" = "e" && continue
	mv $memo_file $memo_file.t
	head -18 <$memo_file.t >$memo_file
	rm $memo_file.t
    fi
    ok=true
done
$echo "\f"
if [ -z "$verbose_to" ] ; then
    $echo "\n\n\nFax an: $fax_phone"
else
    $echo "\n\n\nFax an: $verbose_to ($fax_phone)"
fi
if [ -z "$documents" ] ; then
    $echo "\nDokumente: keine"
else
    $echo "\nDokumente: "`ls -d $documents`
fi
$echo "\nText fuer Deckblatt: $memo_file ($lines Zeilen)"
input "\nFax <s>enden / Eingaben <k>orrigieren / <q>uit ?" doit s
$echo "\n"
case $doit in
    s*) break ;;
    q*) rm $memo_file ; exit ;;
esac
done
#
# build command line, call faxmemo
#
test -z "$verbose_to" || verbose_flag="-D "
$echo "faxmemo $memo_file $verbose_flag\"$verbose_to\" $fax_phone $documents\n"
if [ -z "$verbose_to" ] ; then
    faxmemo $memo_file $fax_phone $documents
else
    faxmemo $memo_file -D "$verbose_to" $fax_phone $documents
fi
rm $memo_file
 |