zsh-users
 help / color / mirror / code / Atom feed
* Can't trace script not in PATH
@ 2010-03-12 15:07 LORANG Geert
  0 siblings, 0 replies; only message in thread
From: LORANG Geert @ 2010-03-12 15:07 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-12 15:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 15:07 Can't trace script not in PATH LORANG Geert

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).