OLD | NEW |
1 #!@POSIX_SHELL@ | 1 #!@POSIX_SHELL@ |
2 | 2 |
3 # xzgrep -- a wrapper around a grep program that decompresses files as needed | 3 # xzgrep -- a wrapper around a grep program that decompresses files as needed |
4 # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca> | 4 # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca> |
5 | 5 |
6 # Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation | 6 # Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation |
7 # Copyright (C) 1993 Jean-loup Gailly | 7 # Copyright (C) 1993 Jean-loup Gailly |
8 | 8 |
9 # Modified for XZ Utils by Andrew Dudman and Lasse Collin. | 9 # Modified for XZ Utils by Andrew Dudman and Lasse Collin. |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 exit;; | 102 exit;; |
103 (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \ | 103 (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \ |
104 | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \ | 104 | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \ |
105 | --with-filename) | 105 | --with-filename) |
106 with_filename=1 | 106 with_filename=1 |
107 continue;; | 107 continue;; |
108 (-l | --files-with-*) | 108 (-l | --files-with-*) |
109 files_with_matches=1;; | 109 files_with_matches=1;; |
110 (-L | --files-witho*) | 110 (-L | --files-witho*) |
111 files_without_matches=1;; | 111 files_without_matches=1;; |
112 (--no-f*) | 112 (-h | --no-f*) |
113 no_filename=1;; | 113 no_filename=1;; |
114 (-V | --v | --ve | --ver | --vers | --versi | --versio | --version) | 114 (-V | --v | --ve | --ver | --vers | --versi | --versio | --version) |
115 echo "$version" || exit 2 | 115 echo "$version" || exit 2 |
116 exit;; | 116 exit;; |
117 esac | 117 esac |
118 | 118 |
119 case $option in | 119 case $option in |
120 (*\'?*) | 120 (*\'?*) |
121 option=\'$(expr "X${option}X" : 'X\(.*\)' | sed "$escape");; | 121 option=\'$(expr "X${option}X" : 'X\(.*\)' | sed "$escape");; |
122 (*) | 122 (*) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 ) || r=2 | 192 ) || r=2 |
193 exit $r | 193 exit $r |
194 fi >&3 5>&- | 194 fi >&3 5>&- |
195 ) | 195 ) |
196 r=$? | 196 r=$? |
197 test "$xz_status" -eq 0 || test "$xz_status" -eq 2 \ | 197 test "$xz_status" -eq 0 || test "$xz_status" -eq 2 \ |
198 || test "$(kill -l "$xz_status" 2> /dev/null)" = "PIPE" || r=2 | 198 || test "$(kill -l "$xz_status" 2> /dev/null)" = "PIPE" || r=2 |
199 test $res -lt $r && res=$r | 199 test $res -lt $r && res=$r |
200 done | 200 done |
201 exit $res | 201 exit $res |
OLD | NEW |