I have the following command
find . -name "*.tiff" -exec echo `basename -s .tiff {}` \;
I expect this to print all my .tiff-files without their file extensions. What I get is
./file1.tiff
./file2.tiff
...
The command,
find . -name "*.tiff" -exec basename -s .tiff {} \;
does yield
file1
file2
...
Is this not supposed to be the input of echo?
The content of the backticks is executed before the find command – yielding just the placeholder
{}, which is used in the find command line – hence your result. You can always useset -xto examine what the shell is up to.