RSS/Atom feed Twitter
Site is read-only, email is disabled

command "find"

This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

command "find" Kolbjørn Stuestøl 25 Mar 21:54
  command "find" Ulf-D. Ehlert 26 Mar 10:52
   command "find" Kolbjørn Stuestøl 26 Mar 19:48
   command "find" Kolbjørn Stuestøl 30 Mar 14:27
Kolbjørn Stuestøl
2008-03-25 21:54:49 UTC (over 16 years ago)

command "find"

The command "find src *.xml | xargs grep -E 'xxx' > xxx.txt" in Cygwin Thanks to Julien for the tip :-) . The command is very fast and I therefore prefer to use it.
But how to exclude files from the listings? Something like: "Find and list all "xyz" in all xml files in all folders except in the .svn folders". Perhaps an unfulfillable wish? The help in Cygwin was of no help to me in this question.
Kolbj?rn

Ulf-D. Ehlert
2008-03-26 10:52:04 UTC (over 16 years ago)

command "find"

Kolbj?rn Stuest?l (Dienstag, 25. M?rz 2008, 21:54):

The command "find src *.xml | xargs grep -E 'xxx' > xxx.txt" in Cygwin Thanks to Julien for the tip :-) . The command is very fast and I therefore prefer to use it.
But how to exclude files from the listings? Something like: "Find and list all "xyz" in all xml files in all folders except in the .svn folders". Perhaps an unfulfillable wish? The help in Cygwin was of no help to me in this question.
Kolbj?rn

find src -name .svn -prune -o -name '*.xml' -print

or (to exclude more than one directory)

find src \( -name .svn -o -name foo \) -prune -o -name '*.xml' -print

Ulf -------------- next part -------------- A non-text attachment was scrubbed... Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/gimp-docs/attachments/20080326/1e99d074/attachment.bin

Kolbjørn Stuestøl
2008-03-26 19:48:07 UTC (over 16 years ago)

command "find"

Ulf-D. Ehlert skreiv:

Kolbj?rn Stuest?l (Dienstag, 25. M?rz 2008, 21:54):

The command "find src *.xml | xargs grep -E 'xxx' > xxx.txt" in Cygwin Thanks to Julien for the tip :-) . The command is very fast and I therefore prefer to use it.
But how to exclude files from the listings? Something like: "Find and list all "xyz" in all xml files in all folders except in the .svn folders". Perhaps an unfulfillable wish? The help in Cygwin was of no help to me in this question.
Kolbj?rn

find src -name .svn -prune -o -name '*.xml' -print

or (to exclude more than one directory)

find src \( -name .svn -o -name foo \) -prune -o -name '*.xml' -print

Ulf

Thank you a lot. I'll give it a try as soon as possible. The more I learn, the more I know how little I know Kolbj?rn

------------------------------------------------------------------------

Kolbjørn Stuestøl
2008-03-30 14:27:51 UTC (over 16 years ago)

command "find"

Ulf-D. Ehlert skreiv:

Kolbj?rn Stuest?l (Dienstag, 25. M?rz 2008, 21:54):

The command "find src *.xml | xargs grep -E 'xxx' > xxx.txt" in Cygwin Thanks to Julien for the tip :-) . The command is very fast and I therefore prefer to use it.
But how to exclude files from the listings? Something like: "Find and list all "xyz" in all xml files in all folders except in the .svn folders". Perhaps an unfulfillable wish? The help in Cygwin was of no help to me in this question.
Kolbj?rn

find src -name .svn -prune -o -name '*.xml' -print

or (to exclude more than one directory)

find src \( -name .svn -o -name foo \) -prune -o -name '*.xml' -print

Ulf

Hi Ulf
My wish was to sort out and list all xml files containing the word "xyz" (or whatever) in the src directory except for the files in the .svn folders.
I had to combine the two commands:
"find src -name '.svn' -prune -o -name '*.xml' -print | xargs grep -E 'xyz' > xyz.txt"
As usual, if you omit the "> xyz.txt" the output goes to the screen instead of the text file.
(Fortunately Cygwin has a repeat command function). Perhaps this command could be of some use to others. Thanks to you and to Julien.
Kolbj?rn

------------------------------------------------------------------------