#!/bin/sh
# Usage: dpr [-P<printer>] [<filename>...]
# Prints the document in duplex (long bind)
if echo "x$1" | grep "^x-P" > /dev/null; then
  flags="$1"
  shift
fi
(
  echo "%!"
  echo "<</Duplex true /Tumble true>> setpagedevice"
  cat "$@"
) | lpr $flags
