Hello,
I faced this strange (mis)behavior of the 'find' command in the POSIX
(MPE55 pp7):
description:
Look at the directory which contains two files:
shell/iX>pwd
/DVLP/NOAMK/ftest
shell/iX>ls -l
-rw-rw---- 1 NOAMK.DVLP DVLP 0 Oct 19 15:10 ll.c
-rwxrwx--- 1 NOAMK.DVLP DVLP 49 Oct 19 15:10 progtorun
What progtorun contains:
shell/iX> cat progtorun
echo Run from find
echo got parameter: $1
exit 1
shell/iX>
If I run it:
shell/iX> progtorun HELLO
Run from find
got parameter: HELLO
shell/iX>
Now I run the find:
shell/iX> find . -name "ll\.c" -print -exec ./progtorun {} \;
./ll.c
shell/iX>
progtorun was not executed!
just to be sure that I 'know' to find:
find . -name "ll\.c" -print -exec cp {} copied \;
./ll.c
shell/iX> ls -l
total 1
-rw-rw---- 1 NOAMK.DVLP DVLP 0 Oct 19 15:24 copied
-rw-rw---- 1 NOAMK.DVLP DVLP 0 Oct 19 15:10 ll.c
-rwxrwx--- 1 NOAMK.DVLP DVLP 49 Oct 19 15:10 progtorun
shell/iX>
So I think I'm doing right and the computer don't.
Can someone solve me the mystery (bug)?
TIA,
Noam
Noam Koren
BMC/New Dimension Software
voice: 972-3-7664508 fax: 972-3-6451100
[log in to unmask]