[Privoxy-devel] dealing with spaces in filenames
Lee
ler762 at gmail.com
Fri Nov 10 23:28:45 UTC 2017
I was looking at the instructions for converting cvs to git
https://sourceforge.net/p/forge/documentation/CVS/
It seems simple enough.. but this bit for finding authors
for vfile in `find /home/cvs/P/PR/PROJECT -name '*,v'`; do
can't deal with spaces in filenames.
Here's what I came up with -- it seems to work, but that's about the
only good thing I can say about it. What's a better way?
(my local copy is in /source/conversion/privoxy-cvs)
find /source/conversion/privoxy-cvs/ -name '*,v' -exec echo "{}" \; |\
sed -e 's/ /\\ /g' >| /tmp/fnames
cat >| /tmp/awkprog << E_O_F
/date/ {a = substr(\$4, 1, length(\$4)-1); print a }
E_O_F
sed -e 's@^@grep "^date" @' \
-e 's@$@ | awk -f /tmp/awkprog | sort -u >> /tmp/cvs-author-names @' \
/tmp/fnames >| /tmp/doit
cat /dev/null >| /tmp/cvs-author-names
sh /tmp/doit
sort -u /tmp/cvs-author-names >| /tmp/cvs-authors
Thanks,
Lee
More information about the Privoxy-devel
mailing list