MichaelAllen
asked on
Problem using 'find' with cygwin
Windows XP
Using cygwin
I have seen this question asked in many places but never seen the answer.
C:\>\cygwin\bin\find . -name \*.htm -exec cat "{}" \;
/usr/bin/find: missing argument to `-exec'
is not working properly
I have tried the follwoing
cygwin\bin\find . -name \*.htm -exec cat '{}' \;
cygwin\bin\find . -name \*.htm -exec cat '{}'\;
cygwin\bin\find . -name \*.htm -exec cat '{}' \;
What I have seen for answers are the use xargs
cygwin\bin\find . -name \*.htm -print | xargs cat
Additionally, since the output of find is a complete path to the file includeing spaces I need to quote the output of the find command prior to passing it into any other utility.
-Thanks
Michael
Using cygwin
I have seen this question asked in many places but never seen the answer.
C:\>\cygwin\bin\find . -name \*.htm -exec cat "{}" \;
/usr/bin/find: missing argument to `-exec'
is not working properly
I have tried the follwoing
cygwin\bin\find . -name \*.htm -exec cat '{}' \;
cygwin\bin\find . -name \*.htm -exec cat '{}'\;
cygwin\bin\find . -name \*.htm -exec cat '{}' \;
What I have seen for answers are the use xargs
cygwin\bin\find . -name \*.htm -print | xargs cat
Additionally, since the output of find is a complete path to the file includeing spaces I need to quote the output of the find command prior to passing it into any other utility.
-Thanks
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
find . -name "*.htm" -exec cat {} \;
Works fine, for years now...