Programatically finding value of "cygdrive" prefix

Ken Dibble kdibble@alltel.net
Thu Aug 11 02:30:00 GMT 2005



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/



More information about the Cygwin mailing list