This isn't really at all gnewsense-specific, but...:
Can anyone explain this:
find -name "*.c" -exec basename '{}' .c \;
test
test2
find -name "*.c" -exec echo $(basename '{}' .c) \;
./test.c
./test2.c
Shouldn't they do the same thing by definition? I could have sworn the
below command used to work:
find -name "*.c" -exec mv {} $(basename '{}' .c).cpp \;
I would expect this to rename test.c test.cpp and test2.c test2.cpp .
Now it changes test.c to test.c.cpp and test2.c to test2.cpp, consistent
with the above.
Alternatively, if I'm way off track, how can I do this (preferably just
find and basename and without a shell script). I've been reading the
UNIX-Haters Handbook and it's starting to get to me...
I almost want to think find is pulling some sort of security shenanigans
(even though I'm using exec not execdir). I do know findutils has been
changed since I last tried this, so perhaps they really did break
something (doubtful).
Thanks,
Matt Flaschen
_______________________________________________
gNewSense-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gnewsense-users