This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Updated: bash-4.3.39-2
- From: Mikhail Usenko <cygwin at inbox dot ru>
- To: cygwin at cygwin dot com
- Date: Mon, 28 Sep 2015 19:48:25 +0300
- Subject: Re: [ANNOUNCEMENT] Updated: bash-4.3.39-2
- Authentication-results: sourceware.org; auth=none
- References: <announce dot 556EF85C dot 3000809 at redhat dot com> <20150604125154 dot 712cbb6af2fc96c5a2306494 at nm dot ru> <560466C1 dot 20709 at redhat dot com> <20150928173032 dot f0a3253c068c27c077a0e18d at inbox dot ru> <5609550E dot 5010100 at redhat dot com>
On Mon, 28 Sep 2015 08:56:14 -0600
Eric Blake <...> wrote:
>
> 'echo -n' and 'echo -e' are non-portable (even in bash; because I can
> use 'shopt -s xpgecho' to get POSIX-mandated behavior). Use 'printf'
> instead.
>
xpg_echo doesn't change 'echo -ne' behavior
('echo -e' force backslash-escape sequences expansion independently)
$ shopt xpg_echo
xpg_echo off
$ echo -e '\r\n' | od -tx1
0000000 0d 0a 0a
0000003
$ shopt -s xpg_echo
$ shopt xpg_echo
xpg_echo on
$ echo -e '\r\n' | od -tx1
0000000 0d 0a 0a
0000003
$ echo '\r\n' | od -tx1
0000000 0d 0a 0a
0000003
--
Mike
--
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