The output of:
find mydir -name foo -exec echo "---$(basename {})---" \;
should be ---foo---, but instead it is ---mydir/foo---
The command basename alone:
basename mydir/foo
echo "---$(basename mydir/foo)---"
brings respective foo and ---foo---
Replacing basename with other command such as uname the construct $(...) works correct.