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
Message-ID: <42FAB844.4010100@alltel.net>
Date: Wed, 10 Aug 2005 21:30:28 -0500
From: Ken Dibble <kdibble@alltel.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Programatically finding value of "cygdrive" prefix
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> <20050811020633.GF10161@trixie.casa.cgf.cx> <42FAB49E.2010401@alltel.net> <20050811022121.GA16476@trixie.casa.cgf.cx>
In-Reply-To: <20050811022121.GA16476@trixie.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes



Christopher Faylor wrote:

>On Wed, Aug 10, 2005 at 09:14:54PM -0500, Ken Dibble wrote:
>  
>
>>Christopher Faylor wrote:
>>    
>>
>>>On Wed, Aug 10, 2005 at 09:01:43PM -0500, Ken Dibble wrote:
>>>      
>>>
>>>>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.
>>>      
>>>
>>If I read the man page correctly:
>>
>>  -m, --mount-commands
>>            write mount commands to replace user and system mount 
>>points and
>>            cygdrive prefixes
>>
>>Since all this script does is take this output of mount -m and parse it....
>>Is "mount -m"  is broken then?
>>
>>Am I not understanding the man page or am I so dense that I'm missing 
>>something?
>>    
>>
>
>Hint:  What does "awk '{print $5}'" do?
>
>  
>
Thanks.  One of these years I will eventually understand when quotes 
cause an item with embedded spaces
to be a single item and when they get lost in processing, causing the 
embedded space item to be multiple items.

I apppreciate your  time.
Ken


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

