X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SARE_FREE_WEBM_LAPOSTE X-Spam-Check-By: sourceware.org Message-ID: <4B9AB023.9050907@laposte.net> Date: Fri, 12 Mar 2010 22:20:35 +0100 From: Cyrille Lefevre User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: allow executing a path in backslash notation References: <720660 DOT 16774 DOT qm AT web88302 DOT mail DOT re4 DOT yahoo DOT com> <20100310092536 DOT GS6505 AT calimero DOT vinschen DOT de> <4B97789F DOT 1060405 AT shaddybaddah DOT name> <416096c61003100254r754b96efy3fc8b4ea5c7f2908 AT mail DOT gmail DOT com> <4B97B788 DOT 2080206 AT redhat DOT com> In-Reply-To: <4B97B788.2080206@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-me-spamlevel: not-spam X-me-spamrating: 40.000000 X-me-spamcause: OK, (0)(0000)gggruggvucftvghtrhhoucdtuddrvdeltddrieehucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecu 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 Eric Blake a =C3=A9crit : >=20 > That's bash's rules. According to POSIX, "\n" has undefined behavior. > And in some other implementations, such as Solaris sh, "\n" is > interpolated by the shell as a newline. Bash instead does the > interpolation when you use $'\n'. isn't it the echo command which interpret the \n sequence ? could you try using : printf ":%s:\n" "x\nx" > But the moral of the story is that within "", it is only portable to use > \ if it is followed by one of the four bytes specifically documented by > POSIX. whatever the shell I've tested, the answer was : :x\nx: even on solaris 9 using /sbin/sh or hp-ux 11i using /usr/old/bin/sh Regards, Cyrille Lefevre --=20 mailto:Cyrille DOT Lefevre-lists AT laposte DOT net -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple