#!/bin/bash

if [ -z "$1" -a -z "$2" ]; then
  # use STDIN and STDOUT
  cat - | recode --force Latin1..IBMPC
elif [ -n "$1" -a -n "$2" ]; then
  # INFILE and OUTFILE
  recode --force Latin1..IBMPC < "$1" > "$2"
else
  echo "$0 requires zero or two arguments: [infile] [outfile]"
  exit 1
fi

