GNU bug report logs - #8103
tac RFE: accept -z, --zero-terminated option

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Bjartur Thorlacius <svartman95@HIDDEN>; Keywords: easy notabug; dated Wed, 23 Feb 2011 23:26:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Added tag(s) easy. Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug. Request was from era eriksson <era@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'tac RFE: accept -z, --zero-terminated option' from 'NUL terminated lines' Request was from era eriksson <era@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 22 Jul 2011 22:06:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 22 18:06:06 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QkNrB-0006xv-IV
	for submit <at> debbugs.gnu.org; Fri, 22 Jul 2011 18:06:05 -0400
Received: from mx.meyering.net ([82.230.74.64])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1QkNr9-0006xQ-4N
	for 8103 <at> debbugs.gnu.org; Fri, 22 Jul 2011 18:06:03 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 663FE600AC;
	Sat, 23 Jul 2011 00:05:57 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: Bjartur Thorlacius <svartman95@HIDDEN>
Subject: tac RFE: accept -z,
	--zero-terminated option (was: bug#8103: NUL terminated lines
In-Reply-To: <87fwrd3mio.fsf@HIDDEN> (Jim Meyering's message of
	"Thu, 24 Feb 2011 08:43:59 +0100")
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
Date: Sat, 23 Jul 2011 00:05:57 +0200
Message-ID: <87vcuu55tm.fsf_-_@HIDDEN>
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -6.1 (------)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.1 (------)

retitle 8103 tac RFE: accept -z, --zero-terminated option
tags 8103 + notabug
thanks

Jim Meyering wrote:
> Bjartur Thorlacius wrote:
>>> Maybe we should modify tac to add the -z option.  Would you care to
>> write a patch?
>> It would be redundant, as tac -s $'\0' is equivalent.
>
> Are you using a non-GNU version of tac?
> If so, please tell us which one -- that may influence
> the decision of whether to make "-s ''" work or to add -z.
>
> With GNU tac, that has never worked:
>
>     $ tac -s ''
>     tac: separator cannot be empty
>
> Making -s accommodate an empty string argument is a possibility,
> but that change looks like it'd be relatively disruptive.
>
> Unless there is already an implementation for which -s '' works,
> I like the idea of adding -z.

I've changed the title and marking this as "not a bug."




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 25 Feb 2011 20:45:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 25 15:45:39 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pt4Xj-0003AO-G5
	for submit <at> debbugs.gnu.org; Fri, 25 Feb 2011 15:45:39 -0500
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1Pt4Xg-0003A9-M3
	for 8103 <at> debbugs.gnu.org; Fri, 25 Feb 2011 15:45:38 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1PKjU1h025402
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 25 Feb 2011 15:45:30 -0500
Received: from [10.3.113.116] (ovpn-113-116.phx2.redhat.com [10.3.113.116])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p1PKjTnY008673; Fri, 25 Feb 2011 15:45:29 -0500
Message-ID: <4D6814E8.7050500@HIDDEN>
Date: Fri, 25 Feb 2011 13:45:28 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14
	Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7
MIME-Version: 1.0
To: Jim Meyering <jim@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>	<87fwrd3mio.fsf@HIDDEN>	<AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>	<87sjvdxn6u.fsf@HIDDEN>
	<m262s8yoag.fsf@HIDDEN> <87fwrbub9u.fsf@HIDDEN>
In-Reply-To: <87fwrbub9u.fsf@HIDDEN>
X-Enigmail-Version: 1.1.2
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigD2DFA67C505809B26FEA34A3"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -10.2 (----------)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org, Bjartur Thorlacius <svartman95@HIDDEN>,
	Andreas Schwab <schwab@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.3 (----------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigD2DFA67C505809B26FEA34A3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 02/25/2011 01:09 PM, Jim Meyering wrote:
>> Actually the shell does.  $'\0' and '' are indistinguishable once pass=
ed
>> as argument.
>=20
> I thought so, too.  Then I tried this:
>=20
>     $ zsh  -c "printf \$'\0'|wc -c"
>     1
>     $ bash -c "printf \$'\0'|wc -c"
>     0
>=20
> The former prints a NUL byte.
> The latter prints nothing.
>=20
> So it depends on your shell.

zsh does some magic to preserve NUL bytes _when passed as arguments to
shell builtins_.  In this case, printf is a zsh shell builtin,
therefore, zsh's $'\0' is able to preserve the fact that you passed in a
NUL byte, then printf outputs that NUL byte again, such that wc sees it
on stdin.

But zsh is special in that regards, and it violates the upcoming POSIX
wording that will be standardized regarding $'' behavior (which means
zsh will have to add yet another shell option soon, if it hasn't
already, to choose between posix and zsh behavior regarding NUL):

http://austingroupbugs.net/view.php?id=3D249

        If a \xXX or \XXX escape sequence yields a byte whose value
        is 0, that byte and any following regular characters and
        escape sequences up to the terminating unescaped single-quote
        shall be evaluated and discarded.

Bash, on the other hand, strips NUL bytes everywhere.  And zsh _can't_
preserve NUL bytes to non-builtins.

[As a side note, printf '\0' portably prints a NUL byte, but that's
because you're passing two bytes on input which get interpreted as an
escape sequence, and not passing a literal NUL byte as in zsh printf $'\0=
']

--=20
Eric Blake   eblake@HIDDEN    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigD2DFA67C505809B26FEA34A3
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNaBToAAoJEKeha0olJ0NqY28H/RDvBw8HXEU/kt0X/sBpuv2j
pIY9s3iI5J0CKA/uHPMsoes1XO8xkl8E2THD/W7ENL4wYsU8TBzg9BSQVQ+/SCed
ohAtrvY18z7F7/Kfts3MvJ4j1e/vmMDjnWLs2oKuP3y8+UAbwL8rc5qUju+81EN3
FTaNE/bhGIkoS7+86xnshBzGQy5Wr4hjcOoWmJoghJwHWVUMU2nhJ9iIlldCPVCL
Y02IWavETcY6ChtN6wHr9TvW1o6Y7zgUCxcmY1OZZZTmY6aBtK4XgkvEK1gVQCVv
C2fZ+lu0yUxjYUzh0LNrnLMyB+Sh80LU2QTZRv7dscCjW718EUqMvoo+y5xpeyU=
=DfWF
-----END PGP SIGNATURE-----

--------------enigD2DFA67C505809B26FEA34A3--




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 25 Feb 2011 20:09:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 25 15:09:26 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pt3yf-0002MV-UN
	for submit <at> debbugs.gnu.org; Fri, 25 Feb 2011 15:09:26 -0500
Received: from mx.meyering.net ([82.230.74.64])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1Pt3yd-0002MI-Fn
	for 8103 <at> debbugs.gnu.org; Fri, 25 Feb 2011 15:09:24 -0500
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id B66F2600EF; Fri, 25 Feb 2011 21:09:17 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
In-Reply-To: <m262s8yoag.fsf@HIDDEN> (Andreas Schwab's message of "Fri, 25
	Feb 2011 19:14:31 +0100")
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
	<AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
	<87sjvdxn6u.fsf@HIDDEN> <m262s8yoag.fsf@HIDDEN>
Date: Fri, 25 Feb 2011 21:09:17 +0100
Message-ID: <87fwrbub9u.fsf@HIDDEN>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -5.8 (-----)
X-Debbugs-Envelope-To: 8103
Cc: Bjartur Thorlacius <svartman95@HIDDEN>, 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.8 (-----)

Andreas Schwab wrote:
> Jim Meyering <jim@HIDDEN> writes:
>
>> Bjartur Thorlacius wrote:
>>> On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
>>>> With GNU tac, that has never worked:
>>>>
>>>>     $ tac -s ''
>>>>     tac: separator cannot be empty
>>>>
>>> NUL!=the empty string.
>>
>> tac treats them the same way.
>
> Actually the shell does.  $'\0' and '' are indistinguishable once passed
> as argument.

I thought so, too.  Then I tried this:

    $ zsh  -c "printf \$'\0'|wc -c"
    1
    $ bash -c "printf \$'\0'|wc -c"
    0

The former prints a NUL byte.
The latter prints nothing.

So it depends on your shell.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 25 Feb 2011 18:14:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 25 13:14:41 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pt2Bd-0008Gp-Ch
	for submit <at> debbugs.gnu.org; Fri, 25 Feb 2011 13:14:41 -0500
Received: from mail-out.m-online.net ([212.18.0.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <whitebox@HIDDEN>) id 1Pt2Bb-0008Ge-TW
	for 8103 <at> debbugs.gnu.org; Fri, 25 Feb 2011 13:14:40 -0500
Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net
	[192.168.8.180])
	by mail-out.m-online.net (Postfix) with ESMTP id 4A331188A171;
	Fri, 25 Feb 2011 19:14:33 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.8.164])
	by mail.m-online.net (Postfix) with ESMTP id 706E41C000BF;
	Fri, 25 Feb 2011 19:14:33 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.180])
	by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new,
	port 10024)
	with ESMTP id CZ--uXX5IrDy; Fri, 25 Feb 2011 19:14:33 +0100 (CET)
Received: from igel.home (ppp-93-104-157-230.dynamic.mnet-online.de
	[93.104.157.230]) by mail.mnet-online.de (Postfix) with ESMTP;
	Fri, 25 Feb 2011 19:14:32 +0100 (CET)
Received: by igel.home (Postfix, from userid 501)
	id 3517BCA2A0; Fri, 25 Feb 2011 19:14:32 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Jim Meyering <jim@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
	<AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
	<87sjvdxn6u.fsf@HIDDEN>
X-Yow: NATHAN...  your PARENTS were in a CARCRASH!!
	They're VOIDED - They COLLAPSED
	They had no CHAINSAWS...  They had no MONEY MACHINES...
	They did PILLS in SKIMPY GRASS SKIRTS...
	Nathan, I EMULATED them...  but they were OFF-KEY...
Date: Fri, 25 Feb 2011 19:14:31 +0100
In-Reply-To: <87sjvdxn6u.fsf@HIDDEN> (Jim Meyering's message of
	"Thu, 24 Feb 2011 20:11:21 +0100")
Message-ID: <m262s8yoag.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.94 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 8103
Cc: Bjartur Thorlacius <svartman95@HIDDEN>, 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Jim Meyering <jim@HIDDEN> writes:

> Bjartur Thorlacius wrote:
>> On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
>>> With GNU tac, that has never worked:
>>>
>>>     $ tac -s ''
>>>     tac: separator cannot be empty
>>>
>> NUL!=the empty string.
>
> tac treats them the same way.

Actually the shell does.  $'\0' and '' are indistinguishable once passed
as argument.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 25 Feb 2011 17:35:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 25 12:35:16 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pt1ZT-0007Cm-Uv
	for submit <at> debbugs.gnu.org; Fri, 25 Feb 2011 12:35:16 -0500
Received: from mail-vx0-f172.google.com ([209.85.220.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <svartman95@HIDDEN>) id 1Pt1ZS-0007Cb-Fz
	for 8103 <at> debbugs.gnu.org; Fri, 25 Feb 2011 12:35:14 -0500
Received: by vxg33 with SMTP id 33so1388414vxg.3
	for <8103 <at> debbugs.gnu.org>; Fri, 25 Feb 2011 09:35:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=a4t2ZJApKJX8vdc1GO9jPNQFKjOi3USiQDSumXBn77o=;
	b=IDM5Aa6wZ/1TLS/zwmFncjcb8etK1vzF27QP2viais4nO3KavdIBDxYL0an1wSgFas
	wI22RVmC9hwmO4XaWBhpAS+7ZfZnDkEFD5qnHruEpmR1SWOdQTRcpDV0yyxMBWda9nKE
	zWLgM59u6b+I+2yCNvFdTmv5nY7602wP1bvq4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=ovuZzBE70UH3QrVBVqGDantJuSYY6zNkmXa/j6CC79p/gGw7JGxqapmQPRCxbIFYER
	nPSZf6NTcAyIRKKksdFxSB7uBzmnSSMyU1YSxp/ExcQ9tUsUBWKs+oXGvBk/60w8+fEx
	s8V/4N1c5kw6POOzp1HlKMeL9OIfa2CWKiXTA=
MIME-Version: 1.0
Received: by 10.52.167.234 with SMTP id zr10mr4598937vdb.92.1298655308710;
	Fri, 25 Feb 2011 09:35:08 -0800 (PST)
Received: by 10.52.162.70 with HTTP; Fri, 25 Feb 2011 09:35:08 -0800 (PST)
In-Reply-To: <87sjvdxn6u.fsf@HIDDEN>
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
	<AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
	<87sjvdxn6u.fsf@HIDDEN>
Date: Fri, 25 Feb 2011 17:35:08 +0000
Message-ID: <AANLkTi=nmsc0cJxc8Eez8dGNMswkfM1UW10ZLo52P1dK@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
From: Bjartur Thorlacius <svartman95@HIDDEN>
To: Jim Meyering <jim@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
> Bjartur Thorlacius wrote:
>> On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
>>> Bjartur Thorlacius wrote:
>>>>> Maybe we should modify tac to add the -z option.  Would you care to
>>>> write a patch?
>>>> It would be redundant, as tac -s $'\0' is equivalent.
>>>
>>> Are you using a non-GNU version of tac?
>> I don't remember whether I was using FreeBSD or GNU tac.
>
> Please confirm.  I may make a difference.
>
I was using GNU tac, but didn't actually test tac -s $'\0'.
It parses it as a C string. Makes sense, once you've written it.

>>> If so, please tell us which one -- that may influence
>>> the decision of whether to make "-s ''" work or to add -z.
>>>
>>> With GNU tac, that has never worked:
>>>
>>>     $ tac -s ''
>>>     tac: separator cannot be empty
>>>
>> NUL!=the empty string.
>
> tac treats them the same way.
>
>>> Making -s accommodate an empty string argument is a possibility,
>>> but that change looks like it'd be relatively disruptive.
>>>
>> I don't understand what that would do. Self-delimited strings would be
>> quite disruptive, indeed, but I gather that's not what you're talking
>> about.
>
> Changing tac.c to make -s accommodate an empty string
> looks like it would require changes that are too invasive.
>
Maybe, but there's nothing stopping us from using non-standard string
functions .




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 24 Feb 2011 22:13:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 24 17:13:27 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PsjR8-00010D-Tv
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 17:13:27 -0500
Received: from c-67-162-90-113.hsd1.in.comcast.net ([67.162.90.113]
	helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pacman-cu@HIDDEN>) id 1PsjR7-000102-MT
	for 8103 <at> debbugs.gnu.org; Thu, 24 Feb 2011 17:13:26 -0500
Received: (qmail 26450 invoked by uid 1000); 24 Feb 2011 22:13:19 -0000
Message-ID: <20110224221319.26449.qmail@HIDDEN>
From: "Alan Curry" <pacman-cu@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
To: svartman95@HIDDEN (Bjartur Thorlacius)
Date: Thu, 24 Feb 2011 17:13:19 -0500 (GMT+5)
In-Reply-To: <AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org, Jim Meyering <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.6 (/)

Bjartur Thorlacius writes:
> 
> On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
> > Bjartur Thorlacius wrote:
> >>> Maybe we should modify tac to add the -z option.  Would you care to
> >> write a patch?
> >> It would be redundant, as tac -s $'\0' is equivalent.

Note that a $'\0' argument in a shell command line is exactly equivalent to
an empty string, since it must be passed from the shell to the program using
execve() which takes NUL-terminated strings.

There is no way to run a program with an actual NUL byte contained in one of
its arguments. execve will stop copying at the NUL, and even if it didn't,
the new program receives its arguments in int argc, char **argv form so how
is it supposed to know that there's a NUL in there that's not a terminator?

This limitation can't be avoided. It's not just a C language thing. The
execve interface is based on NUL-terminated strings at the asm level too.

If tac -s $'\0' did something different from tac -s '', it could only have
been a shell builtin. (Assuming the shell supported the $'...' notation at
all)

-- 
Alan Curry




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 24 Feb 2011 19:11:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 24 14:11:31 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Psgb4-0005T2-68
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 14:11:30 -0500
Received: from mx.meyering.net ([82.230.74.64])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1Psgb1-0005Sp-TY
	for 8103 <at> debbugs.gnu.org; Thu, 24 Feb 2011 14:11:28 -0500
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id D0C6460067; Thu, 24 Feb 2011 20:11:21 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: Bjartur Thorlacius <svartman95@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
In-Reply-To: <AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
	(Bjartur Thorlacius's message of "Thu, 24 Feb 2011 14:19:40 +0000")
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
	<AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
Date: Thu, 24 Feb 2011 20:11:21 +0100
Message-ID: <87sjvdxn6u.fsf@HIDDEN>
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -5.8 (-----)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.8 (-----)

Bjartur Thorlacius wrote:
> On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
>> Bjartur Thorlacius wrote:
>>>> Maybe we should modify tac to add the -z option.  Would you care to
>>> write a patch?
>>> It would be redundant, as tac -s $'\0' is equivalent.
>>
>> Are you using a non-GNU version of tac?
> I don't remember whether I was using FreeBSD or GNU tac.

Please confirm.  I may make a difference.

>> If so, please tell us which one -- that may influence
>> the decision of whether to make "-s ''" work or to add -z.
>>
>> With GNU tac, that has never worked:
>>
>>     $ tac -s ''
>>     tac: separator cannot be empty
>>
> NUL!=the empty string.

tac treats them the same way.

>> Making -s accommodate an empty string argument is a possibility,
>> but that change looks like it'd be relatively disruptive.
>>
> I don't understand what that would do. Self-delimited strings would be
> quite disruptive, indeed, but I gather that's not what you're talking
> about.

Changing tac.c to make -s accommodate an empty string
looks like it would require changes that are too invasive.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 24 Feb 2011 14:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 24 09:19:49 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Psc2m-0006fk-SF
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 09:19:49 -0500
Received: from mail-iy0-f172.google.com ([209.85.210.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <svartman95@HIDDEN>) id 1Psc2k-0006fW-Tn
	for 8103 <at> debbugs.gnu.org; Thu, 24 Feb 2011 09:19:47 -0500
Received: by iyj8 with SMTP id 8so290392iyj.3
	for <8103 <at> debbugs.gnu.org>; Thu, 24 Feb 2011 06:19:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=qtzopHJIyTBj1gPrMS3K05GJByB92lojhcudOLswB5s=;
	b=rucoDOQK+Y9Icl5P5aKxQAe6vF7v+z/n/sda6CvzdnJa/YoTUls6Hc5/qeaVPC/Bl4
	/6xqZbLNN7K4nXYWEJc+zAsXln6Jc27mieNeJnmJ0KGmb3eOmkWR4xPcWZtmnj9KkL0A
	rl/pR8HT41vo9WzydXlMpdYedCrmN8yx3hB7Y=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=MuFxVUZHWXLxDsHAHGYcv2VvpRnacHpWk7+6F9H5mNPonRrq/CQ2JU5H29v5uFHTEf
	fxFQnfPjER0qGuLkk4qhUUjU1O2AAyLd9dJYwCsfXU6sOpCFCWlCB5jHIz/17Dj0ehwI
	SlTtbgcnV2ayLSO7JQATnFXzAGkUO+nM/56Ko=
MIME-Version: 1.0
Received: by 10.231.30.71 with SMTP id t7mr1465527ibc.153.1298557181094; Thu,
	24 Feb 2011 06:19:41 -0800 (PST)
Received: by 10.231.192.10 with HTTP; Thu, 24 Feb 2011 06:19:40 -0800 (PST)
In-Reply-To: <87fwrd3mio.fsf@HIDDEN>
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	<87fwrd3mio.fsf@HIDDEN>
Date: Thu, 24 Feb 2011 14:19:40 +0000
Message-ID: <AANLkTin-aDZzGrk2dnu8SFS9McbnHLLvGiujt0=XLVp5@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
From: Bjartur Thorlacius <svartman95@HIDDEN>
To: Jim Meyering <jim@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.5 (----)

On 2/24/11, Jim Meyering <jim@HIDDEN> wrote:
> Bjartur Thorlacius wrote:
>>> Maybe we should modify tac to add the -z option.  Would you care to
>> write a patch?
>> It would be redundant, as tac -s $'\0' is equivalent.
>
> Are you using a non-GNU version of tac?
I don't remember whether I was using FreeBSD or GNU tac.

> If so, please tell us which one -- that may influence
> the decision of whether to make "-s ''" work or to add -z.
>
> With GNU tac, that has never worked:
>
>     $ tac -s ''
>     tac: separator cannot be empty
>
NUL!=the empty string.

> Making -s accommodate an empty string argument is a possibility,
> but that change looks like it'd be relatively disruptive.
>
I don't understand what that would do. Self-delimited strings would be
quite disruptive, indeed, but I gather that's not what you're talking
about.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at 8103 <at> debbugs.gnu.org:


Received: (at 8103) by debbugs.gnu.org; 24 Feb 2011 07:44:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 24 02:44:08 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PsVrs-0004jo-1D
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:44:08 -0500
Received: from mx.meyering.net ([82.230.74.64])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1PsVrp-0004jE-Lr
	for 8103 <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:44:06 -0500
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id 7F01C600BD; Thu, 24 Feb 2011 08:43:59 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: Bjartur Thorlacius <svartman95@HIDDEN>
Subject: Re: bug#8103: NUL terminated lines
In-Reply-To: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
	(Bjartur Thorlacius's message of "Wed, 23 Feb 2011 23:25:14 +0000")
References: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
Date: Thu, 24 Feb 2011 08:43:59 +0100
Message-ID: <87fwrd3mio.fsf@HIDDEN>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -5.8 (-----)
X-Debbugs-Envelope-To: 8103
Cc: 8103 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.8 (-----)

Bjartur Thorlacius wrote:
>> Maybe we should modify tac to add the -z option.  Would you care to
> write a patch?
> It would be redundant, as tac -s $'\0' is equivalent.

Are you using a non-GNU version of tac?
If so, please tell us which one -- that may influence
the decision of whether to make "-s ''" work or to add -z.

With GNU tac, that has never worked:

    $ tac -s ''
    tac: separator cannot be empty

Making -s accommodate an empty string argument is a possibility,
but that change looks like it'd be relatively disruptive.

Unless there is already an implementation for which -s '' works,
I like the idea of adding -z.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Feb 2011 23:25:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 23 18:25:29 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PsO5J-0005dA-CY
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2011 18:25:29 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <svartman95@HIDDEN>) id 1PsO5I-0005d0-5g
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2011 18:25:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <svartman95@HIDDEN>) id 1PsO5C-0008Io-7o
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2011 18:25:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,
	FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,
	T_DKIM_INVALID, 
	T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:37945)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svartman95@HIDDEN>) id 1PsO5C-0008Ik-4r
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2011 18:25:22 -0500
Received: from [140.186.70.92] (port=46935 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PsO56-0004aM-Ku
	for bug-coreutils@HIDDEN; Wed, 23 Feb 2011 18:25:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <svartman95@HIDDEN>) id 1PsO55-0008Hv-Kx
	for bug-coreutils@HIDDEN; Wed, 23 Feb 2011 18:25:16 -0500
Received: from mail-iy0-f169.google.com ([209.85.210.169]:59306)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <svartman95@HIDDEN>) id 1PsO55-0008Hp-HD
	for bug-coreutils@HIDDEN; Wed, 23 Feb 2011 18:25:15 -0500
Received: by iyf13 with SMTP id 13so5354393iyf.0
	for <bug-coreutils@HIDDEN>; Wed, 23 Feb 2011 15:25:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:date:message-id:subject:from:to
	:content-type; bh=Vprs/Xe3tsKebaYSbrwFVCi3GCbuAwIKgFQo/JZvEMk=;
	b=GBt9st93ja5jAtN/U0qdWV9tVBxpY+eM8c25ju3f7s6NFqi/l6e7e3eNqrAhz4HgO8
	Vv1n6QqLrb1UvMfu3HT5gthGYt4xSMTlhtiqwNjRADQJUFS4L4IM4EUNAvME32ovHWGx
	0AEKi5Mvpd/2MoORuWrKy3I6WeZPEr+A/CM9Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=ZRDlMdiSwMwWgO4ri4dGTJ3Z5Jb0rfu+46SInKKhJXZHcgMBqei6XK3aEcVIP+SpCk
	3PsaP3coM7h8N3iQZUVqhLNi2sSYgwo+wwYQ6JKugBpu2PAVHSarJZyMRM3UdS4nSaTU
	xuHU4qvL8ztC/FdHO+eQ+CQCpkIiwI1+Uxrqo=
MIME-Version: 1.0
Received: by 10.231.10.193 with SMTP id q1mr199101ibq.53.1298503514962; Wed,
	23 Feb 2011 15:25:14 -0800 (PST)
Received: by 10.231.192.10 with HTTP; Wed, 23 Feb 2011 15:25:14 -0800 (PST)
Date: Wed, 23 Feb 2011 23:25:14 +0000
Message-ID: <AANLkTi=eewXu0wqMEgqVMMD3d2qj3hAB22=-10Mz7az-@mail.gmail.com>
Subject: NUL terminated lines
From: Bjartur Thorlacius <svartman95@HIDDEN>
To: bug-coreutils@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 199.232.76.165
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

> Maybe we should modify tac to add the -z option.  Would you care to write a patch?
It would be redundant, as tac -s $'\0' is equivalent.

If you want to switch between newline characters dynamically (a bad
idea, IMO) you could edit libc/stdio-common/getline.c to pass read in
the newline character from an environment variable.
More preferably, you could rewrite getline to read in self-delimeted lines.




Acknowledgement sent to Bjartur Thorlacius <svartman95@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#8103; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.