delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/09/16:35:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <037701c2d083$5c3ed4f0$6b7c86d9@webdev>
Reply-To: "Elfyn McBratney" <cygwin AT cygwin DOT com>
From: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>
To: "cygwin" <cygwin AT cygwin DOT com>
References: <000901c2d022$869cbe80$0200a8c0 AT ufo> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030209080135 DOT 02d48f88 AT pop3 DOT cris DOT com>
Subject: Re: cygwin symlink? bug
Date: Sun, 9 Feb 2003 21:30:17 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

> Max, Trevor,
> 
> BASH keeps an internal idea of the current working directory. In the 
> face of symbolic links, this internal record of the current working 
> directory may not be identical to that computed by the "pwd" programs 
> traversal-to-root algorithm.
> 
> I use this instead of BASH's built-in pwd command:
> 
> wd() {
>      WD="$(pwd)"
>      WDP="$(/bin/pwd)"
>      if [ "$WD" != "$WDP" ]; then
>          echo "bash: $WD"$'\n'"real: $WDP"
>      else
>          echo "$WD"
>      fi
> }
> 
> I use this one if I want to see the Windows form of the current working 
> directory, too:
> 
> awd() {
>      WD="$(pwd)"
>      WDP="$(/bin/pwd)"
>      if [ "$WD" != "$WDP" ]; then
>          echo "bash: $WD"$'\n'"cyg:  $WDP"
>      else
>          echo "cyg:  $WD"
>      fi
>      echo "win:  $(cygpath -w -a "$(pwd)")"
>      echo "mix:  $(cygpath -m -a "$(pwd)")"
> }
> 
> Randall Schulz

Thanks Randall, That's something new for my sandbox ;-)

Ando sorry..meant to send to the list not a direct thing :::::::-)


Regards,

Elfyn McBratney
elfyn AT exposure DOT org DOT uk
www.exposure.org.uk


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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