From unknown Mon Jun 23 15:02:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14299: Incorrect output of `printf "\\n"` Resent-From: Pavel Elkind Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 29 Apr 2013 00:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14299 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 14299@debbugs.gnu.org X-Debbugs-Original-To: "bug-coreutils@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.136719476116911 (code B ref -1); Mon, 29 Apr 2013 00:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Apr 2013 00:19:21 +0000 Received: from localhost ([127.0.0.1]:49085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWboN-0004Od-NH for submit@debbugs.gnu.org; Sun, 28 Apr 2013 20:19:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60273) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWWuQ-0008VK-9l for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWWuA-0004Ej-7D for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:05:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW, RECEIVED_FROM_WINDOWS_HOST, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWuA-0004Ef-3l for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:04:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWu7-00072x-Q7 for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWWu5-0004EE-B8 for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:55 -0400 Received: from liara.ita.chalmers.se ([129.16.226.167]:56338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWu5-0004E1-4G for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:53 -0400 Received: from grunt.ita.chalmers.se ([169.254.4.165]) by liara.ita.chalmers.se ([129.16.226.167]) with mapi id 14.02.0328.009; Sun, 28 Apr 2013 20:44:24 +0200 From: Pavel Elkind Thread-Topic: Incorrect output of `printf "\\n"` Thread-Index: Ac5EP09VbWdaePqzQdu4shM3CHMNcQ== Date: Sun, 28 Apr 2013 18:44:23 +0000 Message-ID: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [90.230.172.51] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Sun, 28 Apr 2013 20:19:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Dear developers,=0A= =0A= I found the following potential bug in printf (version 8.17).=0A= =0A= Actual result: =0A= `printf "\\n"` prints a newline caracter.=0A= =0A= Expected result:=0A= `printf "\\n"` prints a sequence of two individual characters, '\' and 'n',= like '\n', but not a newline character.=0A= =0A= Please address the above issue,=0A= =0A= Many thanks,=0A= Pavel= From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 11:42:28 2013 Received: (at control) by debbugs.gnu.org; 29 Apr 2013 15:42:28 +0000 Received: from localhost ([127.0.0.1]:50495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqDk-00054B-9k for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:42:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35787) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqDg-00053n-75; Mon, 29 Apr 2013 11:42:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3TFg2H3019785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Apr 2013 11:42:02 -0400 Received: from [10.3.113.142] (ovpn-113-142.phx2.redhat.com [10.3.113.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3TFg00O020660; Mon, 29 Apr 2013 11:42:01 -0400 Message-ID: <517E94C8.5010108@redhat.com> Date: Mon, 29 Apr 2013 09:42:00 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Pavel Elkind Subject: Re: bug#14299: Incorrect output of `printf "\\n"` References: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> In-Reply-To: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> X-Enigmail-Version: 1.5.1 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2VOGBMKEWDNIDPTPFGXHG" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: control Cc: 14299-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.3 (---------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VOGBMKEWDNIDPTPFGXHG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 14299 notabug thanks On 04/28/2013 12:44 PM, Pavel Elkind wrote: > Dear developers, >=20 > I found the following potential bug in printf (version 8.17). >=20 > Actual result:=20 > `printf "\\n"` prints a newline caracter. Of course. That's what POSIX requires it to print. $ set -x $ printf ".\\n." + printf '.\n.' =2E =2E $ set - >=20 > Expected result: > `printf "\\n"` prints a sequence of two individual characters, '\' and = 'n', like '\n', but not a newline character. If you want printf to print a literal backslash, you have to properly escape it. There are two levels of escaping to consider; shell escaping (before printf ever sees its argv), and printf escaping. You missed a level, because you forgot that within "", the shell converts \\ into a literal \ as part of the argv, and as my 'set -x' trace showed above, you were passing only one backslash, not two, to printf. Within printf, when it sees the single backslash-n sequence, it converts that escape sequence to newline. You probably meant to do any one of these equivalent actions: printf '.\\n.' printf .\\\\n. printf ".\\\\n." all of which result in the argv handed to printf still containing two backslashes. As such, I'm closing this as not a bug, although you may continue to reply here if you have further comments. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2VOGBMKEWDNIDPTPFGXHG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRfpTIAAoJEKeha0olJ0Nq3CoH/1/PCkMP+SX6SNuzlB7SswEy rzacqeniaZ/VXibeFMeoE6DMNoia2TC6fPQN5kPD759yDl69LwQipxSbkAEX2ClJ w2TXehXHz0JdTBFC+lSHfEQtP8j4wy8zDktGjntVq5MD9JG90KOpadLOZmhNb5OP S7LREaBP3WFibPCLSVZ0UZTn4IMx/LclBV7yi3FQ4he/YfzlIPr8yalJxgmgAqTC Nx5FRHKbkBrivnPGo0Euwb90C8vHuKvrPRGE6U0aPmTDsSW6o3qgaltgtEpsYbVZ 3tIwbrdFgXo69ipQB50HvTYGyX1teOlu9Dr1xVT2llVkOWpRYgDAS+WEdVmttCo= =8Gko -----END PGP SIGNATURE----- ------enig2VOGBMKEWDNIDPTPFGXHG-- From unknown Mon Jun 23 15:02:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Pavel Elkind Subject: bug#14299: closed (Re: bug#14299: Incorrect output of `printf "\\n"`) Message-ID: References: <517E94C8.5010108@redhat.com> <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> X-Gnu-PR-Message: they-closed 14299 X-Gnu-PR-Package: coreutils X-Gnu-PR-Keywords: notabug Reply-To: 14299@debbugs.gnu.org Date: Mon, 29 Apr 2013 15:43:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1367250183-19594-1" This is a multi-part message in MIME format... ------------=_1367250183-19594-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #14299: Incorrect output of `printf "\\n"` which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 14299@debbugs.gnu.org. --=20 14299: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14299 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1367250183-19594-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 14299-done) by debbugs.gnu.org; 29 Apr 2013 15:42:28 +0000 Received: from localhost ([127.0.0.1]:50493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqDj-000549-Uf for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:42:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35787) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqDg-00053n-75; Mon, 29 Apr 2013 11:42:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3TFg2H3019785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Apr 2013 11:42:02 -0400 Received: from [10.3.113.142] (ovpn-113-142.phx2.redhat.com [10.3.113.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3TFg00O020660; Mon, 29 Apr 2013 11:42:01 -0400 Message-ID: <517E94C8.5010108@redhat.com> Date: Mon, 29 Apr 2013 09:42:00 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Pavel Elkind Subject: Re: bug#14299: Incorrect output of `printf "\\n"` References: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> In-Reply-To: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> X-Enigmail-Version: 1.5.1 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2VOGBMKEWDNIDPTPFGXHG" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: 14299-done Cc: 14299-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.3 (---------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VOGBMKEWDNIDPTPFGXHG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 14299 notabug thanks On 04/28/2013 12:44 PM, Pavel Elkind wrote: > Dear developers, >=20 > I found the following potential bug in printf (version 8.17). >=20 > Actual result:=20 > `printf "\\n"` prints a newline caracter. Of course. That's what POSIX requires it to print. $ set -x $ printf ".\\n." + printf '.\n.' =2E =2E $ set - >=20 > Expected result: > `printf "\\n"` prints a sequence of two individual characters, '\' and = 'n', like '\n', but not a newline character. If you want printf to print a literal backslash, you have to properly escape it. There are two levels of escaping to consider; shell escaping (before printf ever sees its argv), and printf escaping. You missed a level, because you forgot that within "", the shell converts \\ into a literal \ as part of the argv, and as my 'set -x' trace showed above, you were passing only one backslash, not two, to printf. Within printf, when it sees the single backslash-n sequence, it converts that escape sequence to newline. You probably meant to do any one of these equivalent actions: printf '.\\n.' printf .\\\\n. printf ".\\\\n." all of which result in the argv handed to printf still containing two backslashes. As such, I'm closing this as not a bug, although you may continue to reply here if you have further comments. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2VOGBMKEWDNIDPTPFGXHG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRfpTIAAoJEKeha0olJ0Nq3CoH/1/PCkMP+SX6SNuzlB7SswEy rzacqeniaZ/VXibeFMeoE6DMNoia2TC6fPQN5kPD759yDl69LwQipxSbkAEX2ClJ w2TXehXHz0JdTBFC+lSHfEQtP8j4wy8zDktGjntVq5MD9JG90KOpadLOZmhNb5OP S7LREaBP3WFibPCLSVZ0UZTn4IMx/LclBV7yi3FQ4he/YfzlIPr8yalJxgmgAqTC Nx5FRHKbkBrivnPGo0Euwb90C8vHuKvrPRGE6U0aPmTDsSW6o3qgaltgtEpsYbVZ 3tIwbrdFgXo69ipQB50HvTYGyX1teOlu9Dr1xVT2llVkOWpRYgDAS+WEdVmttCo= =8Gko -----END PGP SIGNATURE----- ------enig2VOGBMKEWDNIDPTPFGXHG-- ------------=_1367250183-19594-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Apr 2013 00:19:21 +0000 Received: from localhost ([127.0.0.1]:49085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWboN-0004Od-NH for submit@debbugs.gnu.org; Sun, 28 Apr 2013 20:19:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60273) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWWuQ-0008VK-9l for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWWuA-0004Ej-7D for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:05:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW, RECEIVED_FROM_WINDOWS_HOST, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWuA-0004Ef-3l for submit@debbugs.gnu.org; Sun, 28 Apr 2013 15:04:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWu7-00072x-Q7 for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWWu5-0004EE-B8 for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:55 -0400 Received: from liara.ita.chalmers.se ([129.16.226.167]:56338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWWu5-0004E1-4G for bug-coreutils@gnu.org; Sun, 28 Apr 2013 15:04:53 -0400 Received: from grunt.ita.chalmers.se ([169.254.4.165]) by liara.ita.chalmers.se ([129.16.226.167]) with mapi id 14.02.0328.009; Sun, 28 Apr 2013 20:44:24 +0200 From: Pavel Elkind To: "bug-coreutils@gnu.org" Subject: Incorrect output of `printf "\\n"` Thread-Topic: Incorrect output of `printf "\\n"` Thread-Index: Ac5EP09VbWdaePqzQdu4shM3CHMNcQ== Date: Sun, 28 Apr 2013 18:44:23 +0000 Message-ID: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [90.230.172.51] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 28 Apr 2013 20:19:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Dear developers,=0A= =0A= I found the following potential bug in printf (version 8.17).=0A= =0A= Actual result: =0A= `printf "\\n"` prints a newline caracter.=0A= =0A= Expected result:=0A= `printf "\\n"` prints a sequence of two individual characters, '\' and 'n',= like '\n', but not a newline character.=0A= =0A= Please address the above issue,=0A= =0A= Many thanks,=0A= Pavel= ------------=_1367250183-19594-1-- From unknown Mon Jun 23 15:02:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14299: Incorrect output of `printf "\\n"` Resent-From: Davide Brini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 29 Apr 2013 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14299 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: 14299@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136725065425054 (code B ref -1); Mon, 29 Apr 2013 15:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Apr 2013 15:50:54 +0000 Received: from localhost ([127.0.0.1]:50528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqLu-0006Vx-1R for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:50:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53327) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWqLs-0006Vj-0W for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWqLZ-0005Du-21 for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:50:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqFb-00038J-Hc for submit@debbugs.gnu.org; Mon, 29 Apr 2013 11:44:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqFT-0005wh-6q for bug-coreutils@gnu.org; Mon, 29 Apr 2013 11:44:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWqFM-0002nr-N2 for bug-coreutils@gnu.org; Mon, 29 Apr 2013 11:44:15 -0400 Received: from mout.gmx.net ([74.208.4.201]:50359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqFM-0002kb-Ga for bug-coreutils@gnu.org; Mon, 29 Apr 2013 11:44:08 -0400 Received: from zoot.sax ([88.87.214.78]) by mail.gmx.com (mrgmxus002) with ESMTPSA (Nemesis) id 0Ltr4F-1UemDz0O29-011DDY for ; Mon, 29 Apr 2013 17:44:06 +0200 Date: Mon, 29 Apr 2013 17:44:02 +0200 From: Davide Brini In-Reply-To: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> References: <33E38FA6C6555B478F6143C0D2611F33BDC96B@grunt.ita.chalmers.se> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <0LtZx4-1UeVF42HNU-010w6P@mail.gmx.com> X-Provags-ID: V03:K0:x6gH/SEMwfTCj3AoF4S1qu+SQSFB4qFS9N35ldXXhFIleSSK+Qr 0WFghjKuoQf1h4yAH5XAs2cMtmzkGFh6CyazIEvbFI8pmmamCw6rygZU/jsiLVTC/3WyRBx GwGPEDCrK32nUsKBOPPQ21ob7Hg+6iK5/x6oHpvfH7cHI5P7SzaBKGlcdgFAG0ETYzlPqLG RH3XhQVCjbr4Js8WHA5Fg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On Sun, 28 Apr 2013 18:44:23 +0000, Pavel Elkind wrote: > Dear developers, > > I found the following potential bug in printf (version 8.17). > > Actual result: > `printf "\\n"` prints a newline caracter. > > Expected result: > `printf "\\n"` prints a sequence of two individual characters, '\' and > 'n', like '\n', but not a newline character. > > Please address the above issue, printf '\\n' is what you want. Printf has nothing to do with this, it's the shell that interpolates \\ when it's in double quotes. -- D.