summaryrefslogtreecommitdiff
path: root/scripts/file2cat
blob: d95d77e3bf0fd12e0b9bd7cd5897c46f5f7fb60e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

if [ "$1" = "" ]; then
	echo "Usage: file2cat <file>"
	exit 1
fi

case "$1" in
	*.gz|*.Z|*.tgz)	cmd=zcat;;
	*.bz|*.bz2)	cmd=bzcat;;
	*)		cmd=cat;;
esac
$cmd $1