Hello, I cannot explain the following difference between running a 'find -exec basename {}', and a 'find -exec echo $(basename {})', and the same for dirname. I am running GIT coreutils off /usr/local, so the absolute paths. I would really appreciate help in undersstanding what is the difference.
cer...@xango:~/Téléchargements$ find . -type f -exec echo {} \; ./test.sh ./ati-driver-installer-9-3-x86.x86_64.run ./test/aFile cer...@xango:~/Téléchargements$ find . -type f -exec /usr/local/bin/basename {} \; test.sh ati-driver-installer-9-3-x86.x86_64.run aFile cer...@xango:~/Téléchargements$ find . -type f -exec echo $(/usr/local/bin/basename {}) \; ./test.sh ./ati-driver-installer-9-3-x86.x86_64.run ./test/aFile cer...@xango:~/Téléchargements$ find . -type f -exec dirname {} \; . . ./test cer...@xango:~/Téléchargements$ find . -type f -exec /usr/local/bin/dirname {} \; . . ./test cer...@xango:~/Téléchargements$ find . -type f -exec echo $(/usr/local/bin/dirname {}) \; . . . cer...@xango:~/Téléchargements$ /usr/local/bin/basename --version basename (GNU coreutils) 8.4.12-5d4952 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David MacKenzie. cer...@xango:~/Téléchargements$ Thank you, ..C..
signature.asc
Description: OpenPGP digital signature