bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unexpected result on basename/dirname


From: C de-Avillez
Subject: unexpected result on basename/dirname
Date: Wed, 17 Feb 2010 20:09:03 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20100215 Thunderbird/3.0

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.

address@hidden:~/Téléchargements$ find . -type f -exec echo {} \;
./test.sh
./ati-driver-installer-9-3-x86.x86_64.run
./test/aFile

address@hidden:~/Téléchargements$ find . -type f -exec
/usr/local/bin/basename {} \;
test.sh
ati-driver-installer-9-3-x86.x86_64.run
aFile

address@hidden:~/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

address@hidden:~/Téléchargements$ find . -type f -exec dirname {} \;
.
.
./test

address@hidden:~/Téléchargements$ find . -type f -exec
/usr/local/bin/dirname {} \;
.
.
./test

address@hidden:~/Téléchargements$ find . -type f -exec echo
$(/usr/local/bin/dirname {}) \;
.
.
.

address@hidden:~/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.
address@hidden:~/Téléchargements$

Thank you,

..C..


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]