Let\'s say I want to list all php files in a directory including sub-directories, I can run this in bash:
php
ls -l $(find. -name *.php -type f)
I suggest you to firstly search the files and then perform the ls -l (or whatever else). For example like this:
ls -l
find . -name "*php" -type f -exec ls -l {} \;
and then you can pipe the awk expression to make the addition.
awk