:~/tmp$ mkdir test :~/tmp$ cd test :~/tmp/test$ touch a.doc :~/tmp/test$ touch b.txt :~/tmp/test$ find ./ -exec basename {} .doc \; . b.txt a :~/tmp/test$ find ./ -exec echo $(basename {} .doc) \; ./ ./b.txt ./a.doc