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: <42FB30A8.6020509@alltel.net> Date: Thu, 11 Aug 2005 06:04:08 -0500 From: Ken Dibble 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 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> In-Reply-To: <42FAB7FF.A04524AA@dessent.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/