Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Reply-To: cygwin AT cygwin DOT com To: Fred Kulack cc: cygwin AT cygwin DOT com Subject: Re: Programatically finding value of "cygdrive" prefix In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/