[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Nonworking example in info-page
From: |
Ole Tange |
Subject: |
Nonworking example in info-page |
Date: |
Tue, 11 May 2010 14:39:58 +0200 |
Hi Bug-Gzip.
On the info page for Gzip it says:
The following command will find all regular `.gz' files in the
current directory and subdirectories (skipping file names that contain
newlines), and extract them in place without destroying the original,
stopping on the first failure:
find . -name '*
*' -prune -o -name '*.gz' -type f -print |
sed "
s/'/'\\''/g
s/^\\(.*\\)\\.gz$/gunzip <'\\1.gz' >'\\1'/
" |
sh -e
But that seems not to be the case. I just tried:
mkdir '12" records'
echo > '12" records'/"Beatles' Greatest"
echo > '12" records/> Groovy stuff <'
gzip -r .
and then running above. That did not work. Probably because of quotes,
spaces, < and > in filenames. May I suggest you change it to:
The following command will find all regular `.gz' files in the
current directory and subdirectories, and extract them in place
without destroying the original,
running one gunzip process per CPU in parallel:
find . -name '*.gz' -type f -print0 | parallel -0 -j+0 gunzip "<{}" ">{.}"
This would do The Right Thing - even if the names contain newlines,
quotes, <, > or other obscenities. Some may even find it more
readable. Parallel is available here:
http://www.gnu.org/software/parallel/
/Ole
- Nonworking example in info-page,
Ole Tange <=