bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bugs in program "head" and maybe "tail"


From: Philip Rowlands
Subject: Re: bugs in program "head" and maybe "tail"
Date: Mon, 17 Sep 2007 11:26:26 +0100 (BST)

Re-adding address@hidden so replies go in the list archives.

On Fri, 14 Sep 2007, address@hidden wrote:

re,

I'm french sorry for my bad english !

I am badly to explain.
ok head is written for ascII file.
when i try open an other type file, my shell bugs.

when i tape ls after the command head (try my example), the display is not correct. I am to oblige to close Shell and to start again it to return to the normal one.

Yes, by writing binary (control) characters to the terminal, it may become unreadable. There are measures you can take to fix this, depending on the terminal; for example, the standard xterm has a "Do Full Reset" command on the VT options menu. Other terminals or terminal emulators may have similar, or if not then (on my computer) the "reset" program from the ncurses package usually works.

I think that it is a bug if not sorry for the disturbance.
I do not know if that can pose problems of safety measures.

GNU head did what you asked it to and attempted to print the first 10 "lines" of the file to STDOUT. There are programs (bzip2 and GNU grep come to mind) which are more careful to avoid writing non-printable characters to a terminal, but I would describe that as a feature of those apps, not a bug in head (or cat, or tail, or cut).


Cheers,
Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]