# assume stdin if no options given
if [ "$#" -eq 0 ]; then
  set -- -
fi

# iterate through arguments
for arg; do
  # we'll print the filename "-stdin-" rather than -
  # just to be slightly more explicit
  case ${arg} in
    -) fn=-stdin- ;;
    *) fn=${arg} ;;
  esac
  printf '%s\n' "${fn}"
  cat -- "${arg}"
done
