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 From: "Trevor Baker" To: Subject: RE: "cygpath -w ." returns ".\" instead of "." Date: Fri, 2 Jul 2004 12:14:34 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.16; VAE: 6.26.0.3; VDF: 6.26.0.13; host: postman.alphatrade.com) Okay point taken. Stupid trivial script aside... Why does: "cygpath -w ." return ".\" instead of "." "cygpath -m ." return "./" instead of "." And why does: "cygpath -w dir" return "dir" instead of "dir\" "cygpath -m dir" return "dir" instead of "dir/" Shouldn't: "cygpath -w ." "cygpath -m ." "cygpath -u ." return "." in all three cases? I don't understand the difference/reasoning. thanks, Trev > -----Original Message----- > From: cygwin-owner On Behalf Of Trevor Baker > Sent: 01 July 2004 22:43 > the following > trivial script: Even a trivial script can have bugs in it! > #---------- > #!/bin/sh > > BASEDIR=`cygpath -w .` So here on line one, you're asking for a windoze-format path. > FILE="$BASEDIR/out.txt" And here on line two, you're concatenating a unix-style path to the windoze-style path you previously asked for. That looks like a bug to me. > touch "$FILE" > #---------- > > If you run this, $FILE is set to ".\/out.txt" which is not very unix > friendly. WDDTT! cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/