[SOLVED] Script error

Hi all

I have a code in unix as

SCRNAME=`whence $0 | sed -e 's/\.\///g'`

this used to return me this path
/data/ds/dpr_ebicm_uat/etl/

but i ran this code in linux as

SCRNAME=`/bin/ksh whence $0 | sed -e 's/\.\///g'`

and now its returning me blank value in SCRNAME. I am not able to figure out why is this happening.

Could you people please help to figure out why is the whence command working different in linux

Try:

SCRNAME=`/bin/ksh -c "whence $0" | sed -e 's/\.\///g'`

No, its still not working it still gives me blank value in SCRNAME.

---------- Post updated at 02:52 AM ---------- Previous update was at 02:31 AM ----------

Hey i got that working i changed the path of my script and now its working