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]

Programatically finding value of "cygdrive" prefix


Is there a way to find out in a bash script the cygdrive prefix?
I thought something simple like
   mount -p|tail -1|cut -f1
but that incorrectly assumed the fields were tab delimited.
Since there can be spaces in the cygdrive prefix, I can't
use space a delimiter, example:
# mount -p
Prefix              Type         Flags
/cyg drive posix path  system       binmode
----

I could the /proc (registry) interface, but that's seems like
a "hack" and not necessarily a supported way of getting the information:

# echo prefix = \"$(<"/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus Solutions/Cygwin/mounts v2/cygdrive prefix" )\"
prefix = "/cyg drive posix path"


eh?
Linda

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