This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Programatically finding value of "cygdrive" prefix
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Fred Kulack <kulack at us dot ibm dot com>
- Cc: cygwin at cygwin dot com
- Date: Tue, 16 Aug 2005 10:36:37 -0400 (EDT)
- Subject: Re: Programatically finding value of "cygdrive" prefix
- References: <OF62D32F80.1B668CD4-ON8625705F.004ED1EE-8625705F.004EF0ED@us.ibm.com>
- Reply-to: cygwin at cygwin dot com
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/