X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org X-Authority-Analysis: v=1.0 c=1 a=xe8BsctaAAAA:8 a=fnJhMQPIJdlAzTSisUsA:9 a=3h9p0pfcvnkMOT50VBPOKkl1zYYA:4 a=eDFNAWYWrCwA:10 a=rPt6xJ-oxjAA:10 Message-ID: <47FF5580.7010508@byu.net> Date: Fri, 11 Apr 2008 06:11:44 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Reg: dirname References: <47FF3841 DOT FEF4C4D9 AT dessent DOT net> In-Reply-To: <47FF3841.FEF4C4D9@dessent.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Brian Dessent on 4/11/2008 4:06 AM: | If you really want a Win32 path you need to use cygpath, e.g. | | echo $(dirname "$(cygpath -m "$0")") Still not portable - what if the name contains two consecutive spaces, or starts with '-n'? This is even better: printf '%s\n' "$(dirname "$(cygpath -m "$0")")" - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf/VYAACgkQ84KuGfSFAYCdegCgyNUt/uemzbO4SwrExehHQg4c OrwAoLL6MUS/Es/s0L3mfBEczdKlqJvi =p+jW -----END PGP SIGNATURE----- -- 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/