Reg: dirname

Brian Dessent brian@dessent.net
Fri Apr 11 11:34:00 GMT 2008


Manjunatha Appaji Gowda wrote:

> please help on this

Cygwin's goal is to provide a POSIX environment.  That $0 gets
POSIX-ified is on purpose; that is the whole point of /cygdrive.  Using
Win32 paths with drive letters with Cygwin tools is error-prone and
sometimes works only by accident, other times not at all.  It's not
supported.

If you really want a Win32 path you need to use cygpath, e.g.

echo $(dirname "$(cygpath -m "$0")")

Brian

--
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/



More information about the Cygwin mailing list