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