This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Reg: dirname
- From: "Manjunatha Appaji Gowda" <Manjunatha dot A at synopsys dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 11 Apr 2008 13:51:37 +0530
- Subject: 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/