source: Daodan/MinGW/msys/1.0/bin/zless@ 1046

Last change on this file since 1046 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 1.7 KB
RevLine 
[1046]1#!/bin/sh
2
3# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License along
16# with this program; if not, write to the Free Software Foundation, Inc.,
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19PATH="${GZIP_BINDIR-'/usr/bin'}:$PATH"; export PATH
20
21version="zless (gzip) 1.3.12
22Copyright (C) 2007 Free Software Foundation, Inc.
23This is free software. You may redistribute copies of it under the terms of
24the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
25There is NO WARRANTY, to the extent permitted by law.
26
27Written by Paul Eggert."
28
29usage="Usage: $0 [OPTION]... [FILE]...
30Like 'less', but operate on the uncompressed contents of any compressed FILEs.
31
32Options are the same as for 'less'.
33
34Report bugs to <bug-gzip@gnu.org>."
35
36case $1 in
37--help) exec echo "$usage";;
38--version) exec echo "$version";;
39esac
40
41if test "${LESSMETACHARS+set}" != set; then
42 # Work around a bug in less 394 and earlier;
43 # it mishandles the metacharacters '$%=~'.
44 space=' '
45 tab=' '
46 newline='
47'
48 LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
49 export LESSMETACHARS
50fi
51
52LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN
53exec less "$@"
Note: See TracBrowser for help on using the repository browser.