Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 10 Aug 2005 22:06:33 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Programatically finding value of "cygdrive" prefix
Message-ID: <20050811020633.GF10161@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
References: <42FA4604.8000507@tlinx.org> <20050810183616.GA5892@trixie.casa.cgf.cx> <20050810184119.GA6155@trixie.casa.cgf.cx> <42FA7608.4070501@serv.net> <42FA7C4C.4010607@serv.net> <20050811012423.GD10161@trixie.casa.cgf.cx> <42FAB187.8020503@alltel.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42FAB187.8020503@alltel.net>
User-Agent: Mutt/1.5.8i

On Wed, Aug 10, 2005 at 09:01:43PM -0500, Ken Dibble wrote:
>Christopher Faylor wrote:
>>On Wed, Aug 10, 2005 at 03:14:36PM -0700, L Anderson wrote:
>>>Oops! I meant also to add that
>>>
>>>mount -p | sed -nr '2s/(.*) +\S+ +\S+/\1/p'
>>>
>>>is even a shorter version.
>>
>>And it still includes trailing spaces in the eventual result.
>
>In my attempt to understand, can you tell me where (and why) this would 
>fail?
>
>mount -m |  grep "mount -u" | tail -1 | awk '{print $5}'

It doesn't deal with imbedded spaces in the cygdrive prefix --
i.e., the point of this exercise.

cgf

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

