X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: How to uniformly point to the root of a drive? Date: Mon, 21 May 2007 09:25:22 -0400 Message-ID: <31DDB7BE4BF41D4888D41709C476B657068AB00B@NIHCESMLBX5.nih.gov> In-Reply-To: <20070521041542.GA23520@ednor.casa.cgf.cx> References: <20070521041542 DOT GA23520 AT ednor DOT casa DOT cgf DOT cx> From: "Buchbinder, Barry (NIH/NIAID) [E]" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l4LDPosU021552 Christopher Faylor wrote on Monday, May 21, 2007 12:16 AM: > On Sun, May 20, 2007 at 09:12:47PM -0700, Karl M wrote: >> Hi Christopher... >> >>> From: Christopher Faylor Subject: Re: How to uniformly point to the >>> root of a drive? Date: Sun, 20 May 2007 21:21:59 -0400 >>> >>> On Sun, May 20, 2007 at 05:39:21PM -0700, Karl M wrote: >>>> Hi All... >>>> >>>>> From: Christopher Faylor Subject: Re: How to uniformly point to >>>>> the root of a drive? Date: Sun, 20 May 2007 13:36:16 -0400 >>>>> >>>>> On Sun, May 20, 2007 at 01:27:05PM -0400, Christopher Faylor >>>>> wrote: >>>>>> So it sounds like Brian's method would work then wouldn't it? >>>>> >>>>> Does this give you what you want, too? >>>>> >>>>> driveroot=$(cygpath $(cygpath -wm /)/..) >>>>> >>>> What is the difference between "cygpath -m ..." and "cygpath -wm >>>> ..." >>> >>> Come on! Read the fine manual. >>> >> It is indeed a fine manual. I did look and -w and -m look to be >> mutually exclusive in their use, but I did find scripts that use -wm, >> thus my question. > > So, translation: cgf made a typo. The 'w' is not needed. > > cgf FYI, -wm and -mw do not give the same output. I wouldn't know if this would be considered a bug, as someone else pointed out that -m and -w should be mutually exclusive, so neither should work. === /c> cygpath -wm / c:/cygwin /c> cygpath -mw / Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME... cygpath [-c HANDLE] cygpath [-ADHPSW] Convert Unix and Windows format paths, or output system path information Output type options: -d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\) -m, --mixed like --windows, but with regular slashes (C:/WINNT) -M, --mode report on mode of file (binmode or textmode) -u, --unix (default) print Unix form of NAMEs (/cygdrive/c/winnt) -w, --windows print Windows form of NAMEs (C:\WINNT) -t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows' Path conversion options: -a, --absolute output absolute path -l, --long-name print Windows long form of NAMEs (with -w, -m only) -p, --path NAME is a PATH list (i.e., '/bin:/usr/bin') -s, --short-name print DOS (short) form of NAMEs (with -w, -m only) System information: -A, --allusers use `All Users' instead of current user for -D, -P -D, --desktop output `Desktop' directory and exit -H, --homeroot output `Profiles' directory (home root) and exit -P, --smprograms output Start Menu `Programs' directory and exit -S, --sysdir output system directory and exit -W, --windir output `Windows' directory and exit Try `cygpath --help' for more information. 1.0 /c> -- 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/