Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to have Tcl run a find + grep

Status
Not open for further replies.

Fermulator

Programmer
Mar 16, 2007
10
CA
Hi there!

I'm trying to get Tcl to run a 'find this string in all of these files' type of command.

From a shell (not Tcl), the following command works:
Code:
find . -type f -exec grep -ni my_search_text /dev/null {} \;

However, from Tcl, if we try to run:
Code:
exec find . -type f -exec grep -ni $tag /dev/null {} \;

we receive a bunch of errors from grep:
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open
grep: can't open

Clicking on the Tcl error just yields the same text, no additional information.

Any thoughts?
 
could it possibly be permissions?

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top