delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

find . -name "x" | xargs grep -i "topic"


How does this statement works? , is there something wrong with this syntax
Code:
  1. find . -name "x" | xargs grep -i "topic"
Copy Code

TOP


That statement finds all files named "x" in the current directory tree and "pipes" the name to grep as an argument.
Use this better:
Code:
  1. find . -name "x" -exec grep -i "topic" {} \;
Copy Code

TOP


Originally Posted by LKBrwn_DBA
That statement finds all files named "x" in the current directory tree and "pipes" the name to grep as an argument.
Use this better:
Code:
  1. find . -name "x" -exec grep -i "topic" {} \;
Copy Code

not necessary. -exec executes grep for each matched file. some other experiences



find . -name "x" | xargs grep -i "topic"

TOP

Back Forum