diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 1999-08-11 10:34:57 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 1999-08-11 10:34:57 +0000 |
| commit | 994b5741d9f3938bab647ad0919e86553efa2d20 (patch) | |
| tree | ab9bae0071daa9c789d7098d39303a1ce2657150 /gnu | |
| parent | 2336ecd56f1b55538ce6a128b301c18c14522189 (diff) | |
Notes
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/gzip/zforce | 12 | ||||
| -rw-r--r-- | gnu/usr.bin/gzip/zforce.1 | 8 |
2 files changed, 7 insertions, 13 deletions
diff --git a/gnu/usr.bin/gzip/zforce b/gnu/usr.bin/gzip/zforce index 808b0d0f9c4f..02d07e73fe66 100644 --- a/gnu/usr.bin/gzip/zforce +++ b/gnu/usr.bin/gzip/zforce @@ -3,9 +3,9 @@ # compress them twice. # # This can be useful for files with names truncated after a file transfer. -# 12345678901234 is renamed to 12345678901.gz +# foo is renamed to foo.gz # -# $Id$ +# $Id: zforce,v 1.3 1999/05/28 13:23:20 kris Exp $ x=`basename $0` if test $# = 0; then @@ -25,13 +25,9 @@ for i do test `expr "$i" : '.*[.-]gz$'` -eq 0 || continue test `expr "$i" : '.*[.]t[ag]z$'` -eq 0 || continue - if gzip -l < "$i" 2>/dev/null | grep '^defl' > /dev/null; then + if gzip -lv < "$i" 2>/dev/null | grep '^defl' > /dev/null; then - if test `expr "$i" : '^............'` -eq 12; then - new=`expr "$i" : '\(.*\)...$`.gz - else - new="$i.gz" - fi + new="$i.gz" if mv "$i" "$new" 2>/dev/null; then echo $i -- replaced with $new continue diff --git a/gnu/usr.bin/gzip/zforce.1 b/gnu/usr.bin/gzip/zforce.1 index 37c6aba6ac79..2bfb20d7cc73 100644 --- a/gnu/usr.bin/gzip/zforce.1 +++ b/gnu/usr.bin/gzip/zforce.1 @@ -3,7 +3,7 @@ zforce \- force a '.gz' extension on all gzip files .SH SYNOPSIS .B zforce -[ name ... ] +name ... .SH DESCRIPTION .I zforce forces a .gz extension on all @@ -12,9 +12,7 @@ files so that .I gzip will not compress them twice. This can be useful for files with names truncated after a file transfer. -On systems with a 14 char limitation on file names, the original name -is truncated to make room for the .gz suffix. For example, -12345678901234 is renamed to 12345678901.gz. A file name such as foo.tgz -is left intact. +For example, 12345678901 is renamed to 12345678901.gz. +A file name such as foo.tgz is left intact. .SH "SEE ALSO" gzip(1), znew(1), zmore(1), zgrep(1), zdiff(1), gzexe(1) |
