delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/11/05:31:59

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <47FF3841.FEF4C4D9@dessent.net>
Date: Fri, 11 Apr 2008 03:06:57 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Reg: dirname
References: <F2E4114B3DEA464390B27AC89E7DE2CB021AD0DF AT IN01WEMBX1 DOT internal DOT synopsys DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019