Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42FB3CB4.CD113AAC@dessent.net> Date: Thu, 11 Aug 2005 04:55:32 -0700 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Programatically finding value of "cygdrive" prefix References: <42FA4604 DOT 8000507 AT tlinx DOT org> <20050810183616 DOT GA5892 AT trixie DOT casa DOT cgf DOT cx> <20050810184119 DOT GA6155 AT trixie DOT casa DOT cgf DOT cx> <42FA7608 DOT 4070501 AT serv DOT net> <42FA7C4C DOT 4010607 AT serv DOT net> <20050811012423 DOT GD10161 AT trixie DOT casa DOT cgf DOT cx> <42FAB187 DOT 8020503 AT alltel DOT net> <20050811020633 DOT GF10161 AT trixie DOT casa DOT cgf DOT cx> <42FAB49E DOT 2010401 AT alltel DOT net> <42FAB7FF DOT A04524AA AT dessent DOT net> <42FB30A8 DOT 6020509 AT alltel DOT net> <42FB35E7 DOT 1D988F0B AT dessent DOT net> <42FB37AE DOT 7060001 AT alltel DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Ken Dibble wrote: > Well, maybe my installation is hosed then. I have installed for all > users, but mount -m returns > > mount -f -s -b "C:/cygwin/usr/X11R6/lib/X11/fonts" > "/usr/X11R6/lib/X11/fonts" > mount -f -s -b "C:/cygwin/bin" "/usr/bin" > mount -f -s -b "C:/cygwin/lib" "/usr/lib" > mount -f -s -b "C:/cygwin" "/" > mount -u -b --change-cygdrive-prefix "/cygdrive" > mount -s -b --change-cygdrive-prefix "/" It's not hosed, you just happen to have both flavors of cygdrive prefix. The user mounts always take precedence over the system-wide ones. If I were you I'd remove the user cygdrive (since all your other mounts are system) with "umount -uc" and then change your system cygdrive to the desired value, presumably "mount -c /cygdrive". > mount -m | awk -F '"' '/--change-cygdrive-prefix/ { print $2 }' > > results in > > /cygdrive > / > > so, I can see that the grep is not needed, but since there is more than > one output line, tail, head or the like > would be needed, no? Nope, use { print $2; exit } to print the first one and stop. You could modify the regexp to try to match -u or -s but that's a bad idea because you don't know in advance which one(s) will be present. Brian -- 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/