tests: reference: don't rely on od's -w option
[gzip.git] / gunzip.in
blob4ae7762031952ecd82526d64d2e73e68e0fdeb6d
1 #!/bin/sh
2 # Uncompress files. This is the inverse of gzip.
4 # Copyright (C) 2007, 2010-2024 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19 version="gunzip (gzip) @VERSION@
20 Copyright (C) 2024 Free Software Foundation, Inc.
21 This is free software. You may redistribute copies of it under the terms of
22 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
23 There is NO WARRANTY, to the extent permitted by law.
25 Written by Paul Eggert."
27 usage="Usage: $0 [OPTION]... [FILE]...
28 Uncompress FILEs (by default, in-place).
30 Mandatory arguments to long options are mandatory for short options too.
32 -c, --stdout write on standard output, keep original files unchanged
33 -f, --force force overwrite of output file and compress links
34 -k, --keep keep (don't delete) input files
35 -l, --list list compressed file contents
36 -n, --no-name do not save or restore the original name and timestamp
37 -N, --name save or restore the original name and timestamp
38 -q, --quiet suppress all warnings
39 -r, --recursive operate recursively on directories
40 -S, --suffix=SUF use suffix SUF on compressed files
41 --synchronous synchronous output (safer if system crashes, but slower)
42 -t, --test test compressed file integrity
43 -v, --verbose verbose mode
44 --help display this help and exit
45 --version display version information and exit
47 With no FILE, or when FILE is -, read standard input.
49 Report bugs to <bug-gzip@gnu.org>."
51 case $1 in
52 --help) printf '%s\n' "$usage" || exit 1; exit;;
53 --version) printf '%s\n' "$version" || exit 1; exit;;
54 esac
56 exec 'gzip' -d "$@"