#!/bin/bash
# This is a simple filter for lpd that can be used if you want to
# define an `if' filter but still want to be able to send raw 
# printer output. It's also called by magic-filter if you install 
# magic-filter as your `if' so that you can print compressed text
# files. 

if [ "$1" = -c ] ; then
  cat
else
  sed -e s/$/
/
fi

# Useful codge:
#   use lpr -i -l to print raw without trailing formfeed
if [ "$1" != -c -o "$4" = -i0 ]; then 
  echo -ne \\f
fi 


