hi,
I have a peculiar problem
I am working in bash shell
There is one particular directory in my unix box
For the scripts present in that directory, if i put sh <script name>
it is working fine
if i put ksh <script name> the corresponding script is not even executing
but apart from that directory if i put the script in my home directory and run the script using the command ksh <script name> it is working fine
I am wondering what could be reason for the same
can any one plz help how to solve this issue
thanks in advance
How do you know the script does not run?
And please show us this script.
i created a script called tst.ksh
this is the script info.
#!/bin/ksh
date
If i run the script in home directory using the command ksh tst.ksh it is working fine
If i run the same script in some other directory (e.x. source directory) using the command ksh tst.ksh it is not executing but if i try to find the return code using echo $? it is returning 0
in the same directory i tried executing using sh tst.ksh it is displaying the result
what will the reason
try like this :
./tst.ksh
otherwise add set -x in the begining of the script and see the result
#!/bin/ksh
set -x
date