Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Can't trace script not in PATH



Hello,

We use zsh in ksh mode, but you get the same behavior when using zsh.
Could someone explain me following behavior? 

$ cat /home/geert/bin/testscript
#!/bin/ksh
echo called

$ export PATH=$PATH:/home/geert/bin

$ ksh -x /home/geert/bin/testscript
+ /usr/bin/id -un
+ [ geert '!=' root ']'
+ KSH_FLAGS=x
+ echo x
+ grep i
+ [ -n '' ']'
+ [ -r /home/geert/.kshrc ']'
+ . /home/geert/.kshrc
+ zmodload -ab -i zsh/rlimits ulimit
+ ulimit -c 4194303 -s 65536
+ set -o nohashcmds
+ echo called <========== trace of the script
called

No problem so far...

$ ksh -x testscript
testscript: can't open input file: testscript 

Ksh/zsh won't search PATH... I could try -c ...

$ ksh -x -c testscript
+ /usr/bin/id -un
+ [ geert '!=' root ']'
+ KSH_FLAGS=x
+ echo x
+ grep i
+ [ -n '' ']'
+ [ -r /home/geert/.kshrc ']'
+ . /home/geert/.kshrc
+ zmodload -ab -i zsh/rlimits ulimit
+ ulimit -c 4194303 -s 65536
+ set -o nohashcmds
+ testscript <========== NO trace
called

Now it does search PATH but the actual trace of the script is missing.
Though it does trace /etc/kshrc but not the actual script.

So, is this a bug? Or is there a way to let zsh/ksh search the PATH when
you invoke a script? (Like the original ksh)

Regards,
Geert

____
 
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
 
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
 
Any views expressed in this message are those of the sender.



Messages sorted by: Reverse Date, Date, Thread, Author