Adding upstream version 0.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
1bfa18df1d
commit
557010b363
12 changed files with 158 additions and 36 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2009-10-01 Antonio Diaz Diaz <ant_diaz@teleline.es>
|
||||||
|
|
||||||
|
* Version 0.5 released.
|
||||||
|
* zcat.in, zgrep.in: Read again data from stdin.
|
||||||
|
* Added again default compressor for stdin only.
|
||||||
|
|
||||||
2009-09-17 Antonio Diaz Diaz <ant_diaz@teleline.es>
|
2009-09-17 Antonio Diaz Diaz <ant_diaz@teleline.es>
|
||||||
|
|
||||||
* Version 0.4 released.
|
* Version 0.4 released.
|
||||||
|
@ -8,7 +14,7 @@
|
||||||
|
|
||||||
* Version 0.3 released.
|
* Version 0.3 released.
|
||||||
* Removed default compressor.
|
* Removed default compressor.
|
||||||
* zcat.in: Do not read data from stdin.
|
* zcat.in, zgrep.in: Do not read data from stdin.
|
||||||
* Updated home page and mailing list addresses.
|
* Updated home page and mailing list addresses.
|
||||||
|
|
||||||
2009-08-13 Antonio Diaz Diaz <ant_diaz@teleline.es>
|
2009-08-13 Antonio Diaz Diaz <ant_diaz@teleline.es>
|
||||||
|
|
6
NEWS
6
NEWS
|
@ -1,5 +1,3 @@
|
||||||
Changes in version 0.4:
|
Changes in version 0.5:
|
||||||
|
|
||||||
Two new utilities have been added; zegrep and zfgrep.
|
Zcat, zegrep, zfgrep and zgrep can read again compressed data from stdin.
|
||||||
|
|
||||||
Zutils now recognizes file formats independently of filename extensions.
|
|
||||||
|
|
4
configure
vendored
4
configure
vendored
|
@ -5,12 +5,12 @@
|
||||||
# This configure script is free software: you have unlimited permission
|
# This configure script is free software: you have unlimited permission
|
||||||
# to copy, distribute and modify it.
|
# to copy, distribute and modify it.
|
||||||
#
|
#
|
||||||
# Date of this version: 2009-09-17
|
# Date of this version: 2009-10-01
|
||||||
|
|
||||||
args=
|
args=
|
||||||
no_create=
|
no_create=
|
||||||
progname=zutils
|
progname=zutils
|
||||||
progversion=0.4
|
progversion=0.5
|
||||||
srctrigger=zdiff.in
|
srctrigger=zdiff.in
|
||||||
|
|
||||||
# clear some things potentially inherited from environment.
|
# clear some things potentially inherited from environment.
|
||||||
|
|
28
doc/zcat.1
28
doc/zcat.1
|
@ -1,18 +1,20 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
||||||
.TH ZCAT "1" "September 2009" "Zcat 0.4" "User Commands"
|
.TH ZCAT "1" "October 2009" "Zcat 0.5" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Zcat \- manual page for Zcat 0.4
|
Zcat \- manual page for Zcat 0.5
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zcat
|
.B zcat
|
||||||
[\fIOPTIONS\fR] [\fICAT_OPTIONS\fR] [\fIFILES\fR]
|
[\fIOPTIONS\fR] [\fICAT_OPTIONS\fR] [\fIFILES\fR]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcat \- Cat wrapper for compressed files.
|
Zcat \- Cat wrapper for compressed files.
|
||||||
.PP
|
.PP
|
||||||
Zcat is a wrapper script around the cat command that allows
|
Zcat is a wrapper script around the cat command that allows transparent
|
||||||
transparent concatenation of any combination of compressed and
|
concatenation of any combination of compressed and non\-compressed files.
|
||||||
non\-compressed files. If any given file is compressed, its uncompressed
|
If any given file is compressed, its uncompressed content is used. If a
|
||||||
content is used. If a given file does not exist, zcat tries the
|
given file does not exist, zcat tries the compressed file names
|
||||||
compressed file names corresponding to the supported compressors.
|
corresponding to the supported compressors. If no files are specified,
|
||||||
|
the standard input is decompressed using the selected compressor and
|
||||||
|
sent to stdout.
|
||||||
The supported compressors are gzip, bzip2, lzip and xz.
|
The supported compressors are gzip, bzip2, lzip and xz.
|
||||||
.PP
|
.PP
|
||||||
CAT_OPTIONS are passed directly to cat.
|
CAT_OPTIONS are passed directly to cat.
|
||||||
|
@ -24,6 +26,18 @@ display this help and exit
|
||||||
.TP
|
.TP
|
||||||
\fB\-V\fR, \fB\-\-version\fR
|
\fB\-V\fR, \fB\-\-version\fR
|
||||||
output version information and exit
|
output version information and exit
|
||||||
|
.TP
|
||||||
|
\fB\-\-gzip\fR
|
||||||
|
use gzip as decompressor for stdin (default)
|
||||||
|
.TP
|
||||||
|
\fB\-\-bzip2\fR
|
||||||
|
use bzip2 as decompressor for stdin
|
||||||
|
.TP
|
||||||
|
\fB\-\-lzip\fR
|
||||||
|
use lzip as decompressor for stdin
|
||||||
|
.TP
|
||||||
|
\fB\-\-xz\fR
|
||||||
|
use xz as decompressor for stdin
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
Report bugs to zutils\-bug@nongnu.org
|
Report bugs to zutils\-bug@nongnu.org
|
||||||
Zutils home page: http://www.nongnu.org/zutils/zutils.html
|
Zutils home page: http://www.nongnu.org/zutils/zutils.html
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
||||||
.TH ZDIFF "1" "September 2009" "Zdiff 0.4" "User Commands"
|
.TH ZDIFF "1" "October 2009" "Zdiff 0.5" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Zdiff \- manual page for Zdiff 0.4
|
Zdiff \- manual page for Zdiff 0.5
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zdiff
|
.B zdiff
|
||||||
[\fIOPTIONS\fR] [\fIDIFF_OPTIONS\fR] \fIFILE1 \fR[\fIFILE2\fR]
|
[\fIOPTIONS\fR] [\fIDIFF_OPTIONS\fR] \fIFILE1 \fR[\fIFILE2\fR]
|
||||||
|
|
20
doc/zgrep.1
20
doc/zgrep.1
|
@ -1,7 +1,7 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
||||||
.TH ZGREP "1" "September 2009" "Zgrep 0.4" "User Commands"
|
.TH ZGREP "1" "October 2009" "Zgrep 0.5" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Zgrep \- manual page for Zgrep 0.4
|
Zgrep \- manual page for Zgrep 0.5
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zgrep
|
.B zgrep
|
||||||
[\fIOPTIONS\fR] [\fIGREP_OPTIONS\fR] \fIPATTERN \fR[\fIFILES\fR]
|
[\fIOPTIONS\fR] [\fIGREP_OPTIONS\fR] \fIPATTERN \fR[\fIFILES\fR]
|
||||||
|
@ -12,7 +12,9 @@ Zgrep is a wrapper script around the grep command that allows
|
||||||
transparent search on any combination of compressed and non\-compressed
|
transparent search on any combination of compressed and non\-compressed
|
||||||
files. If any given file is compressed, its uncompressed content is
|
files. If any given file is compressed, its uncompressed content is
|
||||||
used. If a given file does not exist, zgrep tries the compressed file
|
used. If a given file does not exist, zgrep tries the compressed file
|
||||||
names corresponding to the supported compressors.
|
names corresponding to the supported compressors. If no files are
|
||||||
|
specified, the standard input is decompressed using the selected
|
||||||
|
compressor and fed to grep.
|
||||||
The supported compressors are gzip, bzip2, lzip and xz.
|
The supported compressors are gzip, bzip2, lzip and xz.
|
||||||
.PP
|
.PP
|
||||||
Zegrep is a shortcut for "zgrep \fB\-E\fR"
|
Zegrep is a shortcut for "zgrep \fB\-E\fR"
|
||||||
|
@ -27,6 +29,18 @@ display this help and exit
|
||||||
.TP
|
.TP
|
||||||
\fB\-V\fR, \fB\-\-version\fR
|
\fB\-V\fR, \fB\-\-version\fR
|
||||||
output version information and exit
|
output version information and exit
|
||||||
|
.TP
|
||||||
|
\fB\-\-gzip\fR
|
||||||
|
use gzip as decompressor for stdin (default)
|
||||||
|
.TP
|
||||||
|
\fB\-\-bzip2\fR
|
||||||
|
use bzip2 as decompressor for stdin
|
||||||
|
.TP
|
||||||
|
\fB\-\-lzip\fR
|
||||||
|
use lzip as decompressor for stdin
|
||||||
|
.TP
|
||||||
|
\fB\-\-xz\fR
|
||||||
|
use xz as decompressor for stdin
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
Report bugs to zutils\-bug@nongnu.org
|
Report bugs to zutils\-bug@nongnu.org
|
||||||
Zutils home page: http://www.nongnu.org/zutils/zutils.html
|
Zutils home page: http://www.nongnu.org/zutils/zutils.html
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
||||||
.TH ZUTILS "1" "September 2009" "Zutils 0.4" "User Commands"
|
.TH ZUTILS "1" "October 2009" "Zutils 0.5" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Zutils \- manual page for Zutils 0.4
|
Zutils \- manual page for Zutils 0.5
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zutils
|
.B zutils
|
||||||
[\fIoptions\fR] [\fIfiles\fR]
|
[\fIoptions\fR] [\fIfiles\fR]
|
||||||
|
|
BIN
doc/zutils.info
BIN
doc/zutils.info
Binary file not shown.
|
@ -5,8 +5,8 @@
|
||||||
@finalout
|
@finalout
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set UPDATED 17 September 2009
|
@set UPDATED 1 October 2009
|
||||||
@set VERSION 0.4
|
@set VERSION 0.5
|
||||||
|
|
||||||
@dircategory Data Compression
|
@dircategory Data Compression
|
||||||
@direntry
|
@direntry
|
||||||
|
@ -67,8 +67,9 @@ Zcat is a wrapper script around the cat command that allows transparent
|
||||||
concatenation of any combination of compressed and non-compressed files.
|
concatenation of any combination of compressed and non-compressed files.
|
||||||
If any given file is compressed, its uncompressed content is used. If a
|
If any given file is compressed, its uncompressed content is used. If a
|
||||||
given file does not exist, zcat tries the compressed file names
|
given file does not exist, zcat tries the compressed file names
|
||||||
corresponding to the supported compressors. The supported compressors
|
corresponding to the supported compressors. If no files are specified,
|
||||||
are gzip, bzip2, lzip and xz.
|
the standard input is decompressed using the selected compressor and
|
||||||
|
sent to stdout.
|
||||||
|
|
||||||
The format for running zcat is:
|
The format for running zcat is:
|
||||||
|
|
||||||
|
@ -91,6 +92,18 @@ Print an informative help message describing the options and exit.
|
||||||
@itemx -V
|
@itemx -V
|
||||||
Print the version number of zcat on the standard output and exit.
|
Print the version number of zcat on the standard output and exit.
|
||||||
|
|
||||||
|
@item --gzip
|
||||||
|
Use gzip as decompressor for stdin (default).
|
||||||
|
|
||||||
|
@item --bzip2
|
||||||
|
Use bzip2 as decompressor for stdin.
|
||||||
|
|
||||||
|
@item --lzip
|
||||||
|
Use lzip as decompressor for stdin.
|
||||||
|
|
||||||
|
@item --xz
|
||||||
|
Use xz as decompressor for stdin.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +115,7 @@ Print the version number of zcat on the standard output and exit.
|
||||||
Zdiff is a wrapper script around the diff and cmp commands that allows
|
Zdiff is a wrapper script around the diff and cmp commands that allows
|
||||||
transparent comparison of any combination of compressed and
|
transparent comparison of any combination of compressed and
|
||||||
non-compressed files. If any given file is compressed, its uncompressed
|
non-compressed files. If any given file is compressed, its uncompressed
|
||||||
content is used. The supported compressors are gzip, bzip2, lzip and xz.
|
content is used.
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Zcmp is a shortcut for @samp{zdiff --cmp}
|
Zcmp is a shortcut for @samp{zdiff --cmp}
|
||||||
|
@ -156,8 +169,9 @@ Zgrep is a wrapper script around the grep command that allows
|
||||||
transparent search on any combination of compressed and non-compressed
|
transparent search on any combination of compressed and non-compressed
|
||||||
files. If any given file is compressed, its uncompressed content is
|
files. If any given file is compressed, its uncompressed content is
|
||||||
used. If a given file does not exist, zgrep tries the compressed file
|
used. If a given file does not exist, zgrep tries the compressed file
|
||||||
names corresponding to the supported compressors. The supported
|
names corresponding to the supported compressors. If no files are
|
||||||
compressors are gzip, bzip2, lzip and xz.
|
specified, the standard input is decompressed using the selected
|
||||||
|
compressor and fed to grep.
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Zegrep is a shortcut for @samp{zgrep -E}@*
|
Zegrep is a shortcut for @samp{zgrep -E}@*
|
||||||
|
@ -185,6 +199,18 @@ Print an informative help message describing the options and exit.
|
||||||
@itemx -V
|
@itemx -V
|
||||||
Print the version number of zgrep on the standard output and exit.
|
Print the version number of zgrep on the standard output and exit.
|
||||||
|
|
||||||
|
@item --gzip
|
||||||
|
Use gzip as decompressor for stdin (default).
|
||||||
|
|
||||||
|
@item --bzip2
|
||||||
|
Use bzip2 as decompressor for stdin.
|
||||||
|
|
||||||
|
@item --lzip
|
||||||
|
Use lzip as decompressor for stdin.
|
||||||
|
|
||||||
|
@item --xz
|
||||||
|
Use xz as decompressor for stdin.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ if [ ! -x "${ZCAT}" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d tmp ] ; then rm -r tmp ; fi
|
if [ -d tmp ] ; then rm -rf tmp ; fi
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
echo -n "testing zutils..."
|
echo -n "testing zutils..."
|
||||||
cd "${objdir}"/tmp
|
cd "${objdir}"/tmp
|
||||||
|
@ -49,6 +49,21 @@ for i in ${extensions}; do
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
|
|
||||||
|
"${ZCAT}" < in > copy || fail=1
|
||||||
|
cmp in copy || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZCAT}" < in.gz > copy || fail=1
|
||||||
|
cmp in copy || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZCAT}" --gzip < in.gz > copy || fail=1
|
||||||
|
cmp in copy || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZCAT}" --bzip2 < in.bz2 > copy || fail=1
|
||||||
|
cmp in copy || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZCAT}" --lzip < in.lz > copy || fail=1
|
||||||
|
cmp in copy || fail=1
|
||||||
|
echo -n .
|
||||||
"${ZCAT}" in > copy || fail=1
|
"${ZCAT}" in > copy || fail=1
|
||||||
cmp in copy || fail=1
|
cmp in copy || fail=1
|
||||||
echo -n .
|
echo -n .
|
||||||
|
@ -103,6 +118,16 @@ for i in ${extensions}; do
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
|
|
||||||
|
"${ZGREP}" License < in 2>&1 > /dev/null || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZGREP}" License < in.gz 2>&1 > /dev/null || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZGREP}" --gzip License < in.gz 2>&1 > /dev/null || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZGREP}" --bzip2 License < in.bz2 2>&1 > /dev/null || fail=1
|
||||||
|
echo -n .
|
||||||
|
"${ZGREP}" --lzip License < in.lz 2>&1 > /dev/null || fail=1
|
||||||
|
echo -n .
|
||||||
"${ZGREP}" License in 2>&1 > /dev/null || fail=1
|
"${ZGREP}" License in 2>&1 > /dev/null || fail=1
|
||||||
echo -n .
|
echo -n .
|
||||||
"${ZGREP}" License -- -in- 2>&1 > /dev/null || fail=1
|
"${ZGREP}" License -- -in- 2>&1 > /dev/null || fail=1
|
||||||
|
|
31
zcat.in
31
zcat.in
|
@ -8,6 +8,7 @@
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
args=
|
args=
|
||||||
|
default_prog=gzip
|
||||||
two_hyphens=0
|
two_hyphens=0
|
||||||
|
|
||||||
# Loop over args until a filename is found
|
# Loop over args until a filename is found
|
||||||
|
@ -17,11 +18,13 @@ while [ x"$1" != x ] ; do
|
||||||
--help | --he* | -h)
|
--help | --he* | -h)
|
||||||
echo "Zcat - Cat wrapper for compressed files."
|
echo "Zcat - Cat wrapper for compressed files."
|
||||||
echo
|
echo
|
||||||
echo "Zcat is a wrapper script around the cat command that allows"
|
echo "Zcat is a wrapper script around the cat command that allows transparent"
|
||||||
echo "transparent concatenation of any combination of compressed and"
|
echo "concatenation of any combination of compressed and non-compressed files."
|
||||||
echo "non-compressed files. If any given file is compressed, its uncompressed"
|
echo "If any given file is compressed, its uncompressed content is used. If a"
|
||||||
echo "content is used. If a given file does not exist, zcat tries the"
|
echo "given file does not exist, zcat tries the compressed file names"
|
||||||
echo "compressed file names corresponding to the supported compressors."
|
echo "corresponding to the supported compressors. If no files are specified,"
|
||||||
|
echo "the standard input is decompressed using the selected compressor and"
|
||||||
|
echo "sent to stdout."
|
||||||
echo "The supported compressors are gzip, bzip2, lzip and xz."
|
echo "The supported compressors are gzip, bzip2, lzip and xz."
|
||||||
echo
|
echo
|
||||||
echo "Usage: $0 [OPTIONS] [CAT_OPTIONS] [FILES]"
|
echo "Usage: $0 [OPTIONS] [CAT_OPTIONS] [FILES]"
|
||||||
|
@ -32,6 +35,10 @@ while [ x"$1" != x ] ; do
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h, --help display this help and exit"
|
echo " -h, --help display this help and exit"
|
||||||
echo " -V, --version output version information and exit"
|
echo " -V, --version output version information and exit"
|
||||||
|
echo " --gzip use gzip as decompressor for stdin (default)"
|
||||||
|
echo " --bzip2 use bzip2 as decompressor for stdin"
|
||||||
|
echo " --lzip use lzip as decompressor for stdin"
|
||||||
|
echo " --xz use xz as decompressor for stdin"
|
||||||
echo
|
echo
|
||||||
echo "Report bugs to zutils-bug@nongnu.org"
|
echo "Report bugs to zutils-bug@nongnu.org"
|
||||||
echo "Zutils home page: http://www.nongnu.org/zutils/zutils.html"
|
echo "Zutils home page: http://www.nongnu.org/zutils/zutils.html"
|
||||||
|
@ -42,7 +49,15 @@ while [ x"$1" != x ] ; do
|
||||||
echo "This script is free software: you have unlimited permission"
|
echo "This script is free software: you have unlimited permission"
|
||||||
echo "to copy, distribute and modify it."
|
echo "to copy, distribute and modify it."
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-)
|
--gz*)
|
||||||
|
default_prog=gzip ;;
|
||||||
|
--bz*)
|
||||||
|
default_prog=bzip2 ;;
|
||||||
|
--lz*)
|
||||||
|
default_prog=lzip ;;
|
||||||
|
--xz*)
|
||||||
|
default_prog=xz ;;
|
||||||
|
- | -f)
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift ; two_hyphens=1 ; break ;;
|
shift ; two_hyphens=1 ; break ;;
|
||||||
|
@ -54,6 +69,10 @@ while [ x"$1" != x ] ; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $# = 0 ]; then
|
||||||
|
${default_prog} -cdfq | cat ${args}
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
retval=0
|
retval=0
|
||||||
for i in "$@" ; do
|
for i in "$@" ; do
|
||||||
|
|
22
zgrep.in
22
zgrep.in
|
@ -8,6 +8,7 @@
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
args=
|
args=
|
||||||
|
default_prog=gzip
|
||||||
have_pat=0
|
have_pat=0
|
||||||
list=0
|
list=0
|
||||||
no_name=0
|
no_name=0
|
||||||
|
@ -24,7 +25,9 @@ while [ x"$1" != x ] ; do
|
||||||
echo "transparent search on any combination of compressed and non-compressed"
|
echo "transparent search on any combination of compressed and non-compressed"
|
||||||
echo "files. If any given file is compressed, its uncompressed content is"
|
echo "files. If any given file is compressed, its uncompressed content is"
|
||||||
echo "used. If a given file does not exist, zgrep tries the compressed file"
|
echo "used. If a given file does not exist, zgrep tries the compressed file"
|
||||||
echo "names corresponding to the supported compressors."
|
echo "names corresponding to the supported compressors. If no files are"
|
||||||
|
echo "specified, the standard input is decompressed using the selected"
|
||||||
|
echo "compressor and fed to grep."
|
||||||
echo "The supported compressors are gzip, bzip2, lzip and xz."
|
echo "The supported compressors are gzip, bzip2, lzip and xz."
|
||||||
echo
|
echo
|
||||||
echo "Zegrep is a shortcut for \"zgrep -E\""
|
echo "Zegrep is a shortcut for \"zgrep -E\""
|
||||||
|
@ -38,6 +41,10 @@ while [ x"$1" != x ] ; do
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h, --help display this help and exit"
|
echo " -h, --help display this help and exit"
|
||||||
echo " -V, --version output version information and exit"
|
echo " -V, --version output version information and exit"
|
||||||
|
echo " --gzip use gzip as decompressor for stdin (default)"
|
||||||
|
echo " --bzip2 use bzip2 as decompressor for stdin"
|
||||||
|
echo " --lzip use lzip as decompressor for stdin"
|
||||||
|
echo " --xz use xz as decompressor for stdin"
|
||||||
echo
|
echo
|
||||||
echo "Report bugs to zutils-bug@nongnu.org"
|
echo "Report bugs to zutils-bug@nongnu.org"
|
||||||
echo "Zutils home page: http://www.nongnu.org/zutils/zutils.html"
|
echo "Zutils home page: http://www.nongnu.org/zutils/zutils.html"
|
||||||
|
@ -48,6 +55,14 @@ while [ x"$1" != x ] ; do
|
||||||
echo "This script is free software: you have unlimited permission"
|
echo "This script is free software: you have unlimited permission"
|
||||||
echo "to copy, distribute and modify it."
|
echo "to copy, distribute and modify it."
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
--gz*)
|
||||||
|
default_prog=gzip ;;
|
||||||
|
--bz*)
|
||||||
|
default_prog=bzip2 ;;
|
||||||
|
--lz*)
|
||||||
|
default_prog=lzip ;;
|
||||||
|
--xz*)
|
||||||
|
default_prog=xz ;;
|
||||||
-[drRzZ] | --di* | --exc* | --inc* | --nu* | --rec*)
|
-[drRzZ] | --di* | --exc* | --inc* | --nu* | --rec*)
|
||||||
echo "$0: option $1 not supported"
|
echo "$0: option $1 not supported"
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
|
@ -80,6 +95,11 @@ if [ ${have_pat} = 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# = 0 ]; then
|
||||||
|
${default_prog} -cdfq | grep ${args}
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
retval=0
|
retval=0
|
||||||
for i in "$@" ; do
|
for i in "$@" ; do
|
||||||
if [ "$i" = "--" ] && [ ${two_hyphens} = 0 ] ; then two_hyphens=1
|
if [ "$i" = "--" ] && [ ${two_hyphens} = 0 ] ; then two_hyphens=1
|
||||||
|
|
Loading…
Add table
Reference in a new issue