Results 1 to 1 of 1
> ksh ./myKshScript
$0=./myKshScript
> ./myKshScript
$0=./myKshScript
BUT
> . ./myKshScript"
$0=-ksh
Hi Folks,
When running a ksh script using a dot instead of /bin/ksh, $0 is set to -ksh. ...
- 11-16-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 1
ksh: how do i find filename if $0=-ksh
> ksh ./myKshScript
$0=./myKshScript
> ./myKshScript
$0=./myKshScript
BUT
> . ./myKshScript"
$0=-ksh
Hi Folks,
When running a ksh script using a dot instead of /bin/ksh, $0 is set to -ksh. Is there another way to get the filename? Eg. Syntax errors are reported with the full filename so the information must be stored somewhere.
A follow up question, does anyone know how to access the ksh call stack? I'm working on debugging tools.
Thanks


Reply With Quote