delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/16/10:36:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Tue, 16 Aug 2005 10:36:37 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Fred Kulack <kulack AT us DOT ibm DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Programatically finding value of "cygdrive" prefix
In-Reply-To: <OF62D32F80.1B668CD4-ON8625705F.004ED1EE-8625705F.004EF0ED@us.ibm.com>
Message-ID: <Pine.GSO.4.61.0508161031310.9560@slinky.cs.nyu.edu>
References: <OF62D32F80 DOT 1B668CD4-ON8625705F DOT 004ED1EE-8625705F DOT 004EF0ED AT us DOT ibm DOT com>
MIME-Version: 1.0

On Tue, 16 Aug 2005, Fred Kulack wrote:

> On 08/16/2005 at 08:25:18 AM, cygwin-owner wrote:
                                ^^^^^^^^^^^^ (i.e., Igor Pechtchanski :-D)

> mount -m | grep -- --change-cygdrive-prefix | \
>   xargs bash -c 'while [ $# != 1 ]; do shift; done; echo "$@"' --
> --- end of excerpt ---

This would also work, BTW, and is simpler:

mount -m | grep -- --change-cygdrive-prefix | xargs bash -c 'eval echo \$$#' --

> Why the complexity? Is there something wrong with this?
>
> > regtool get "/HKCU/Software/Cygnus Solutions/Cygwin/mounts v2/cygdrive
> prefix"
> /

Yes, there is.  The "mount" command is guaranteed to always work in the
future, but the mount settings are not guaranteed to stay in the registry.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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