From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 26 14:40:15 2014 Received: (at submit) by debbugs.gnu.org; 26 Jan 2014 19:40:15 +0000 Received: from localhost ([127.0.0.1]:36895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7VZ0-0000QE-SB for submit@debbugs.gnu.org; Sun, 26 Jan 2014 14:40:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60743) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7REs-0000Vw-Om for submit@debbugs.gnu.org; Sun, 26 Jan 2014 10:03:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7REk-0000uh-6l for submit@debbugs.gnu.org; Sun, 26 Jan 2014 10:03:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,MIME_HTML_ONLY,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7REk-0000uc-3f for submit@debbugs.gnu.org; Sun, 26 Jan 2014 10:03:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7REb-0000gn-M2 for bug-coreutils@gnu.org; Sun, 26 Jan 2014 10:03:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7RET-0000tI-8h for bug-coreutils@gnu.org; Sun, 26 Jan 2014 10:02:53 -0500 Received: from mail-vb0-x22f.google.com ([2607:f8b0:400c:c02::22f]:51738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7RET-0000tE-3R for bug-coreutils@gnu.org; Sun, 26 Jan 2014 10:02:45 -0500 Received: by mail-vb0-f47.google.com with SMTP id p6so2819375vbe.20 for ; Sun, 26 Jan 2014 07:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:disposition-notification-to:date:to:from:subject :mime-version:content-type; bh=FhJF6eZmimxmvlE34n8QoYoMOV0LR0qs2o8jSy5U+cA=; b=cbvJMA2UHuf7M03aUkp6xFVqYYPRhf4cDwpw3JCxul+jwylmD777O0R8i3ovfnhw5x JRTf6U8kvpXDMJ5csqRm1wQjS+nSIyO9fsnVLQOkWrA3u1UGrz+pPJDMaSDQCthM1sm0 jYOQobZZIbkBnv4vPu+iSV0MO0hpf6tH80fuMYAicLvZfgQt1XEhqBdKLT8RHTPMojPB lk5YzfInCEbyvN8lxjAO4yJdIAPN2IFFbZPzX85Ed4GHdXRJ8qdjTSVeisPqx/Cg2k0z VtL4IWTHeYlfJiZtZoBQ1v0x8YUy3Bpo8DGQz+H2kJCYrxs817saGzPmYEnyEBr+hb4I UO1Q== X-Received: by 10.58.4.138 with SMTP id k10mr12913929vek.8.1390748564482; Sun, 26 Jan 2014 07:02:44 -0800 (PST) Received: from LG-LaptopW8.gmail.com (181-182-37-10.genericrev.telcel.net.ve. [181.182.37.10]) by mx.google.com with ESMTPSA id qi4sm21235349vec.4.2014.01.26.07.02.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 26 Jan 2014 07:02:43 -0800 (PST) Message-ID: <52e52393.04de3a0a.2980.0c09@mx.google.com> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sun, 26 Jan 2014 10:32:02 -0430 To: bug-coreutils@gnu.org From: LGUC Subject: Bug report for 'head' (and 'wc' et. al.) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_174298609==_" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 26 Jan 2014 14:40:13 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) --=====================_174298609==_ Content-Type: text/html; charset="us-ascii" THE MISSED ATTACMENT!

Caracas, Sunday 26th, 2014

Ref: Bug report for 'head' (and 'wc' et. al.)

Dear friends:

  Please find attached the text file 'head-tst.txt'
 
  As you easily can see, the following command fails and do not print
anything, even if the file has:  6 lines,  49 words and  250 chars:

  'head -n -0 head-tst.txt'

  The last line on the file does NOT end with a '\n', and this seems
to be the base of the problem. If you add the last '\n', 'head' works
pretty fine.

  So this seems to be a problem with the definition of a 'text line':
I guess that a line that has around 68 normal chars and 13 spaces, is
a good candidate to be considered as a line.

  I found the same problem in several other core utils, being the
most remarcable 'wc'. If you executes:

  'wc head-tst.txt'

  you will get:

    5  49 250 head-tst.txt

  what is wrong, as the file has six (6) lines instead of five (5).
The last one line is missing due to the fact that it does not
include a '\n' at the end.

  In 1998 I fix 'wc', and I have attached 'wc-fix.c' including only
the most remarkable aspects, in case it could be of any help.


Best regards,

Luis G. Uribe C.


Attachments inside 'head-tst.zip':
- 'head-tst.txt': text file that makes 'head' core utility to fail
- 'wc-fix.c':     fix to same problem, applyied to 'wc' in 1998

Software ID:
   GNU coreutils 8.15  January 2012  HEAD(1)
   (Cygwin)
--=====================_174298609==_ Content-Type: application/octet-stream; name="head-tst.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="head-tst.zip" UEsDBBQAAgAIABEWOkT9UhumqAAAAPoAAAAMAAAAaGVhZC10c3QudHh0Vc5BC4JAEIbhu+B/+Drt Ja1znSISBNMgIQIvm67t0jJCO2H++2wNwusM8z6TJmCtYKVjWEMKWjrkRQlJUNQYukNUJJYQWskG ESFaC7DjmN+MVhrr4jAIg9m6754PhyTND+gN67E1oDVWjZRkL8zNCQoD4Db8OJ/z+SnB2jjf8Fr2 vbqsinFC0qKiDfoaTaem3+vuRQzDW/y/QrJLszP2xfGUHcrsuvgAUEsBAhQAFAACAAgAERY6RP1S G6aoAAAA+gAAAAwAAAAAAAAAAQAgAAAAAAAAAGhlYWQtdHN0LnR4dFBLBQYAAAAAAQABADoAAADS AAAAAAA= --=====================_174298609==_-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 26 20:12:25 2014 Received: (at control) by debbugs.gnu.org; 27 Jan 2014 01:12:25 +0000 Received: from localhost ([127.0.0.1]:37054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7akT-0001g3-07 for submit@debbugs.gnu.org; Sun, 26 Jan 2014 20:12:25 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:63311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7akR-0001fu-AK for control@debbugs.gnu.org; Sun, 26 Jan 2014 20:12:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4CAC+y5VJtThEL/2dsb2JhbAANTIN8gxu2VIJ8MHeDOQoqVA0CBSECEQI6BgICFQgBAYgGqll2nDAXgSmOAYJZgUkEnxaOXA Received: from unknown (HELO [192.168.1.79]) ([109.78.17.11]) by mail2.vodafone.ie with ESMTP; 27 Jan 2014 01:12:22 +0000 Message-ID: <52E5B276.80602@draigBrady.com> Date: Mon, 27 Jan 2014 01:12:22 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: control@debbugs.gnu.org X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 16559 16560 16561 stop [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [213.233.128.44 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 16559 16560 16561 stop [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [213.233.128.44 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject forcemerge 16559 16560 16561 stop From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 26 20:24:27 2014 Received: (at control) by debbugs.gnu.org; 27 Jan 2014 01:24:27 +0000 Received: from localhost ([127.0.0.1]:37061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7aw7-00036l-6j for submit@debbugs.gnu.org; Sun, 26 Jan 2014 20:24:27 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:41132) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7aw4-00036X-7u; Sun, 26 Jan 2014 20:24:25 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApkFAIq05VJtThEL/2dsb2JhbAANTINEUKJPAQGWDYN+gR6DGQEBAQMBMgFGBQsLDQsJFg8JAwIBAgFFBg0BBwEBh3kNA6pSk2uJPBePDQeEOAEDjgGLWIU9hXGIaw Received: from unknown (HELO [192.168.1.79]) ([109.78.17.11]) by mail2.vodafone.ie with ESMTP; 27 Jan 2014 01:24:23 +0000 Message-ID: <52E5B547.2030206@draigBrady.com> Date: Mon, 27 Jan 2014 01:24:23 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: LGUC Subject: Re: bug#16561: Bug report for 'head' (and 'wc' et. al.) References: <52e524ee.b075340a.4538.01a5@mx.google.com> In-Reply-To: <52e524ee.b075340a.4538.01a5@mx.google.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 16561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) forcemerge 16561 16329 stop On 01/26/2014 03:07 PM, LGUC wrote: > THE INCOMPLETE ATTACMENT! (working on sunday makes not my lucky day. > Sorry for the inconveniences!. > Please disregard the previous 2 mails) > __________________________________________________________________ > > Caracas, Sunday 26th, 2014 > Ref: Bug report for 'head' (and 'wc' et. al.) > Dear friends: > Please find attached the text file 'head-tst.txt' > > As you easily can see, the following command fails and do not print > anything, even if the file has: 6 lines, 49 words and 250 chars: > 'head -n -0 head-tst.txt' > The last line on the file does NOT end with a '\n', and this seems > to be the base of the problem. If you add the last '\n', 'head' works > pretty fine. Right that's an issue, coincidentally recently reported: http://bugs.gnu.org/16329 We'll include the fix for that soon. > So this seems to be a problem with the definition of a 'text line': > I guess that a line that has around 68 normal chars and 13 spaces, is > a good candidate to be considered as a line. > I found the same problem in several other core utils, being the > most remarcable 'wc'. If you executes: > 'wc head-tst.txt' > you will get: > 5 49 250 head-tst.txt > what is wrong, as the file has six (6) lines instead of five (5). > The last one line is missing due to the fact that it does not > include a '\n' at the end. > In 1998 I fix 'wc', and I have attached 'wc-fix.c' including only > the most remarkable aspects, in case it could be of any help. So wc is different and is defined by POSIX to only count '\n' chars. So we can't change that really. We might be able to add a --visible-lines option that would handle this and also unicode line separators etc. But that would require more debate since it would be a new option. thanks, Pádraig. From unknown Sat Jun 21 03:30:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Feb 2014 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator