This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Programatically finding value of "cygdrive" prefix




Brian Dessent wrote:

Ken Dibble wrote:



Am I not understanding the man page or am I so dense that I'm missing
something?



Yes you are missing something, and no 'mount -m' works perfectly fine. If the cygdrive prefix has a space in it, using awk to print the fifth
word will be incorrect. Consider:


echo 'mount -s -b --change-cygdrive-prefix "/thing with spaces"' \
      | awk '{ print $5 }'

Brian

Still searching for a non-sed solution Ken hammered out:

So this would be correct?

mount -m | grep "mount -u" | tail -1 | awk -F'"' '{ print $2 }'

as
echo 'mount -s -b --change-cygdrive-prefix "/thing with spaces"' | awk -F'"' '{ print $2 }'
results in
/thing with spaces


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]