broken handling of properly quoted relative paths
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 22 15:55:42 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Steigerwald wrote:
> Hi!
>
> I am a new subcriber to this list... I have written a Bazaar article for
> german Linux-Magazin. I posted about it here some time ago. I use Bazaar
> regularily and really like it.
>
> However today I found a slight problem:
>
> martin at shambala:~> find -type d -and -name ".bzr" -printf "%h\n" |
> xargs -n1 -i{} echo bzr check \"{}\"
> bzr check "./Geburtstag 2007"
> bzr check "./.crm114"
> bzr check "./Computer/Mondschein/Konfiguration/etc"
> bzr check "./Linux/LUSC/WorkshopWeekend2006/Automatische
> Netzwerk-Konfiguration"
> [...]
>
By the way, I think you also would want:
find -type d ... -print0 | xargs -n1 -0 ...
That lets 'find' print things out as null terminated strings, and xargs
receive them as null terminated strings.
I'm not sure how to strip of the final path (which is what I assume you
are doing with the find -printf "%h\n".)
But I guess you could also do:
- -printf "%h\0" | xargs -0 ...
At least from my experience using -print0 | xargs -0 is a lot better,
because otherwise *xargs* also splits on any whitespace. Not just newlines.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGe+LuJdeBCYSNAAMRAkIcAJ0Z+On8tASOm+pxzpukeKIDOeoe0wCfdemn
eAYfSFEZtpIaddVpZU73bL4=
=VQCV
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list