This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reg: dirname


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]