This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Programatically finding value of "cygdrive" prefix


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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]