#!/bin/sh -e

for f in "$@"; do
	t="$(file -b "$f")"
	if [ -z "${t##bzip2 compressed data*}" ]; then
		bzcat "$f"
	else
		zcat "$f"
	fi
done
