GNU bug report logs -
#27136
doc: cat: explain what is "standard input"
Previous Next
To reply to this bug, email your comments to 27136 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#27136
; Package
coreutils
.
(Mon, 29 May 2017 21:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
kalle <kalle <at> projektwerkstatt.de>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 29 May 2017 21:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
[bug-coreutils@gnu.org (text/plain, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27136
; Package
coreutils
.
(Mon, 29 May 2017 22:09:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 27136 <at> debbugs.gnu.org (full text, mbox):
On 29/05/17 14:06, kalle wrote:
> hello,
> I think it is not obvious for everyone how to deal with Standard Input in the `cat'-command. I took some time to figure out, that Ctrl-d aborts it. and just now I realized, that EOF the first time acts to terminate a so called "record" (I got the term from "info coreutils 'tac'"), and applied twice terminates the Standard Input. If <newline> was typed before it is enough to type it once.
> So I think it would be helpful for some people if in the documentations man/info cat there would be at least a reference, if not a short explanation how to deal with Standard Input.
Note this is nothing specific to cat or coreutils for that matter.
This applies to all programs and is specific to the terminal driver.
Now where info like this should be documented is an interesting question.
Perhaps coreutils should take some responsibility for documenting such things?
Anyway some info for what is happening here...
Note there is no "record" distinction here.
The Ctrl-d combo just means "end input". I.E. send pending input to the program.
When there is text on the line already this is sent, and usually (as cat does too)
the program will read() again looking for more input. If you send pending input
on an empty line, then the program will get zero bytes and usually quit.
You can see this with:
strace -e read cat
Note the Ctrl-d combo can be changed in the terminal driver
using the slightly misnamed eof stty setting:
$ stty -a | grep eof
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
cheers,
Pádraig
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27136
; Package
coreutils
.
(Sun, 13 Aug 2017 10:23:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 27136 <at> debbugs.gnu.org (full text, mbox):
hmm. no one is responding anymore. No change in cat-Documentation then?
Am 25.07.2017 um 00:31 schrieb kalle:
>
>
> Am 30.05.2017 um 00:08 schrieb Pádraig Brady:
>> On 29/05/17 14:06, kalle wrote:
>>> hello,
>>> I think it is not obvious for everyone how to deal with Standard Input in the `cat'-command. I took some time to figure out, that Ctrl-d aborts it. and just now I realized, that EOF the first time acts to terminate a so called "record" (I got the term from "info coreutils 'tac'"), and applied twice terminates the Standard Input. If <newline> was typed before it is enough to type it once.
>>> So I think it would be helpful for some people if in the documentations man/info cat there would be at least a reference, if not a short explanation how to deal with Standard Input.
>>
>> Note this is nothing specific to cat or coreutils for that matter.
>> This applies to all programs and is specific to the terminal driver.
>
>> Now where info like this should be documented is an interesting question.
>
> maybe in a general unix-introduction. Then for all commands, where "end
> input" has to be given in instead of Enter/linefeed, it should be
> referred to some explaining text. There could be a manual about the role
> of terminal drivers, possibly man 7.
>
>> Perhaps coreutils should take some responsibility for documenting such things?
>>
>> Anyway some info for what is happening here...
>> Note there is no "record" distinction here.
>> The Ctrl-d combo just means "end input". I.E. send pending input to the program.
>> When there is text on the line already this is sent, and usually (as cat does too)
>> the program will read() again looking for more input. If you send pending input
>> on an empty line, then the program will get zero bytes and usually quit.
>> You can see this with:
>>
>> strace -e read cat
>>
>> Note the Ctrl-d combo can be changed in the terminal driver
>> using the slightly misnamed eof stty setting:
>>
>> $ stty -a | grep eof
>> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
>>
>> cheers,
>> Pádraig
>>
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27136
; Package
coreutils
.
(Sun, 13 Aug 2017 18:23:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 27136 <at> debbugs.gnu.org (full text, mbox):
kalle wrote:
> no one is responding anymore. No change in cat-Documentation then?
Nothing so far, yes. No specific wording changes have been proposed, as far as I
can see from <https://bugs.gnu.org/27136>. You can propose a wording change by
sending us the output of "diff -u" or "git send-email" or something like that.
It's OK if you don't have time to do that, as this is evidently low-priority.
Severity set to 'wishlist' from 'normal'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 29 Oct 2018 03:18:01 GMT)
Full text and
rfc822 format available.
Changed bug title to 'doc: cat: explain what is "standard input"' from 'info coreutils'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 29 Oct 2018 03:18:01 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.