Q:

How to modify '{}' argument passed to -exec by the find command?

I have find command like this:
find <some criteria> -exec echo "{}" \;
But I would like to modify "{}" argument before echo is called.
For example deprive it of the first path segment (${variable#*/}) and leave the rest.
I know that I can call another script after -exec but I prefer to have everything in one script.
Is it possible?

A:

you can use an inline sh-script:
find tmp -exec sh -c 'basename "{}" | wc' \;

A:

You can just pipe it to sed like this:
find <some criteria> | sed "s,.#*/,,"

