diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-27 23:51:06 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-27 23:51:06 +0000 |
commit | f142f39d9c66ef6c721eeed1c0636f7e35c3b24c (patch) | |
tree | f25d74f1cfdbc6d66d6d55a89764566e1748bb3e /gnu | |
parent | fc9661ba7747f3154acf277c4c0ea475839171e7 (diff) |
Use POSIX :space: character class as suggested by solar@openwall.com
Also add a sepatate case for --suffix= to keep the regex exact
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gzip/znew | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/gzip/znew b/gnu/usr.bin/gzip/znew index c580e09f015..b531473b692 100644 --- a/gnu/usr.bin/gzip/znew +++ b/gnu/usr.bin/gzip/znew @@ -12,9 +12,11 @@ block=1024 # block is the disk block size (best guess, need not be exact) case "$GZIP" in - *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[ ]*\([^ ]*\).*$/\1/'` + *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[[:space:]]*\([^[:space:]]*\).*$/\1/'` ;; - *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix[ =]*\([^ ]*\).*$/\1/'` + *-suffix=*) ext=`echo "$GZIP" | sed 's/^.*--suffix=\([^[:space:]]*\).*$/\1/'` + ;; + *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix[[:space:]][[:space:]]*\([^[:space:]]*\).*$/\1/'` ;; *) ext='.gz' ;; |