-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Melchior FRANZ wrote:
| * Stefan Seifert -- Thursday 17 January 2008:
|> find . -name \*.xml | xargs grep vsi-3d
|
| I didn't use this because this puts all file paths into the
| command line buffer, and it depends on the buffer size whether
| it works or not (unlike with "while read"). I remember cases
| where it didn't work, but I just tried again and it did! Is
| this now done with dynamic allocation in modern Linux kernels?

xargs guarantees that the argument space won't overflow; it invokes grep 
repeatedly with
as many arguments as it can until all the arguments are consumed.

To add to this crazy thread, you can use the --include argument to GNU grep to 
search
certain files: grep -r -e vsi-3d --include='*.xml' . However, I never do that. 
I use
the 'rgrep' and 'lgrep' commands inside emacs 22; very convenient for visiting 
all the hits
returned by grep.

Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHj08DeDhWHdXrDRURAmlzAKCtlB8Cm0huQbFAPLkAihH62Y3blgCg28Xx
7QiL19vVE3w3udaWpORxxvw=
=BIpy
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to