The problem with your code is that the wildcard is *expanded by the shell before being passed for search. Reply like this:
for i in `find /home/Phil/Programs/Compile -name '*.cpp'` ; do echo $i ; done
xargsas suggested by others, is a good solution to this problem.
source
share