Hi all,

i have some problem with $0

for example my script looks like this

#!/bin/sh

echo `dirname "$0"`

i m keeping this script in this path c:/users/test/script

if i do

 sh -x c:/users/test/script from cygwin (bash shell)

ideally results should look like in below

$ sh -x c:/users/test/test
++ dirname c:/users/test/test
+ echo c:/users/test/
c:/users/test/

for some reason in some machines results are showing like in below

$ sh -x c:/users/test/test
++ dirname /cygdrive/c/users/test/test
+ echo /cygdrive/c/users/test
/cygdrive/c/users/test

please help on this

Manjunath

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to