#!/bin/sh

case $# in
  0)
  tr '\012' '\015'
  break;;

  1)
  tr '\012' '\015' < $1
  break;;

  2)
  tr '\012' '\015' < $1 > $2
  break;;

  *)
  echo "args: 0 (stdin/stdout), 1 (ifile/stdout), or 2 (ifile/ofile)"
  exit 1;;
esac