1#! /bin/sh 2# ex:ts=8 3 4# $FreeBSD$ 5 6case "$1" in 7 *.zip) 8 exec unzip -c "$1" 2>/dev/null 9 ;; 10 *.Z) 11 exec uncompress -c "$1" 2>/dev/null 12 ;; 13 *.gz) 14 exec gzip -d -c "$1" 2>/dev/null 15 ;; 16 *.bz2) 17 exec bzip2 -d -c "$1" 2>/dev/null 18 ;; 19 *.xz) 20 exec xz -d -c "$1" 2>/dev/null 21 ;; 22 *.lzma) 23 exec lzma -d -c "$1" 2>/dev/null 24 ;; 25 *.zst) 26 exec zstd -d -q -c "$1" 2>/dev/null 27 ;; 28 *) exec cat "$1" 2>/dev/null 29 ;; 30esac 31