File: file2cat

package info (click to toggle)
sendmail 8.13.8-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,204 kB
  • ctags: 138
  • sloc: sh: 8,118; perl: 4,184; makefile: 3,810; ansic: 186
file content (13 lines) | stat: -rw-r--r-- 171 bytes parent folder | download | duplicates (56)
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