Re: cat fionread usage bug?

2009-03-11 Thread Jim Meyering
Pádraig Brady wrote: I was just looking at this line in cat.c: http://url.ie/1aq1 if (input_pending) write_pending (outbuf, bpout); Shouldn't that be? if (!input_pending) write_pending (outbuf, bpout); Oh! You're right. That's a bug (mine): disabled optimization.

Re: cat fionread usage bug?

2009-03-11 Thread Pádraig Brady
Jim Meyering wrote: Pádraig Brady wrote: I was just looking at this line in cat.c: http://url.ie/1aq1 if (input_pending) write_pending (outbuf, bpout); Shouldn't that be? if (!input_pending) write_pending (outbuf, bpout); Oh! You're right. That's a bug

Re: cat fionread usage bug?

2009-03-11 Thread Jim Meyering
Pádraig Brady wrote: Jim Meyering wrote: Pádraig Brady wrote: I was just looking at this line in cat.c: http://url.ie/1aq1 if (input_pending) write_pending (outbuf, bpout); Shouldn't that be? if (!input_pending) write_pending (outbuf, bpout); Oh! You're right.

Re: cat fionread usage bug?

2009-03-11 Thread Pádraig Brady
Jim Meyering wrote: Pádraig Brady wrote: but I guess it's worth keeping the functionality. I agree. Would you like to handle it? will do ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: cat fionread usage bug?

2009-03-11 Thread Jim Meyering
Would you like to handle it? will do thanks! ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: cat fionread usage bug?

2009-03-11 Thread Pádraig Brady
Jim Meyering wrote: Would you like to handle it? will do attached From 5af58e0557198c464f39a2a0939c37941fdfd668 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= p...@draigbrady.com Date: Wed, 11 Mar 2009 11:39:33 + Subject: [PATCH] cat: Fix immediate output of processed data

Re: cat fionread usage bug?

2009-03-11 Thread Pádraig Brady
Pádraig Brady wrote: Jim Meyering wrote: Would you like to handle it? will do attached oops, previous one didn't update tests/Makefile.am From 11e4014d8c8ffa0e26f8c4518e5e19ef9159869d Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= p...@draigbrady.com Date: Wed, 11 Mar 2009

Re: cat fionread usage bug?

2009-03-11 Thread Jim Meyering
Pádraig Brady wrote: Jim Meyering wrote: Would you like to handle it? will do attached From 5af58e0557198c464f39a2a0939c37941fdfd668 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= p...@draigbrady.com Date: Wed, 11 Mar 2009 11:39:33 + Subject: [PATCH] cat: Fix immediate

Re: cat - -

2008-01-17 Thread James Youngman
On Jan 16, 2008 12:41 AM, [EMAIL PROTECTED] wrote: J But the main problem is to figure out where to put such a document J so that new users will actually read it. What do you think? Somewhere around $ info -o - coreutils|grep -C 2 Intro I'm not sure sure about that at all, because the

Re: cat - -

2008-01-15 Thread Pádraig Brady
[EMAIL PROTECTED] wrote: Bet you don't document anywhere that/why $ echo a|cat - - will only give one a. Or maybe even raise an error... Seems obvious to me. Perhaps the following is more obvious :) $ echo mouse | cat - - Pádraig. ___

Re: cat - -

2008-01-15 Thread Mike Frysinger
On Monday 14 January 2008, [EMAIL PROTECTED] wrote: Bet you don't document anywhere that/why $ echo a|cat - - will only give one a. what were you expecting to happen ? it is not possible for cat to re-read stdin once it has consumed it. -mike signature.asc Description: This is a digitally

Re: cat - -

2008-01-15 Thread jidanni
MF what were you expecting to happen ? it is not possible for cat to MF re-read stdin once it has consumed it. Yes, but you don't document it I bet. At least not in the path that starts with man cat. Just reading the coreutils docs, one wouldn't know why $ date|cat q b - c q - q - b worked

Re: cat - -

2008-01-15 Thread Mike Frysinger
On Tuesday 15 January 2008, [EMAIL PROTECTED] wrote: what were you expecting to happen ? it is not possible for cat to re-read stdin once it has consumed it. Yes, but you don't document it I bet. At least not in the path that starts with man cat. Just reading the coreutils docs, one

Re: cat - -

2008-01-15 Thread jidanni
Yes yes. I'm just saying supposing a theoretical new user's first encounter with all this stuff was the document trail that started with the cat man page, then he would think - was broken. So still an understanding of Unix is implied as the docs perhaps describe 95% but not yet 100% of what one

Re: cat - -

2008-01-15 Thread James Youngman
On Jan 16, 2008 12:01 AM, [EMAIL PROTECTED] wrote: Yes yes. I'm just saying supposing a theoretical new user's first encounter with all this stuff was the document trail that started with the cat man page, then he would think - was broken. The best place to document this could well be a

Re: cat - -

2008-01-15 Thread jidanni
J But the main problem is to figure out where to put such a document J so that new users will actually read it. What do you think? Somewhere around $ info -o - coreutils|grep -C 2 Intro ___ Bug-coreutils mailing list Bug-coreutils@gnu.org

Re: cat binary files bug

2007-06-06 Thread James Youngman
On 6/6/07, Alexander Meyr [EMAIL PROTECTED] wrote: hi there.. dont know if its a known bug. ill try to describe: using backtrack v2 final kernel 2.6.20 I have no idea what that is. problem using cat when input is a executive file like /bin/ls. cat displays the file and when finished

Re: cat binary files bug

2007-06-06 Thread Bob Proulx
Alexander Meyr wrote: dont know if its a known bug. ill try to describe: Thanks for the report however what you are describing is not a bug in the 'cat' program but a misuse of it. using backtrack v2 final kernel 2.6.20 This behavior is not related to the kernel. It is related to the

Re: cat bug on cygwin

2007-05-31 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote: ... I'm wondering if we could just add something like this to the binary-io module, which we can then update as needed to compensate for any other irregularities discovered in swapping stdio to binary mode: I like it. I know the code below is just a sketch,

Re: cat bug on cygwin

2007-05-31 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote: ... I'm wondering if we could just add something like this to the binary-io module, which we can then update as needed to compensate for any other irregularities discovered in swapping stdio to binary mode: /* Make sure FP is in binary mode. Return FP on

Re: cat bug on cygwin

2007-05-30 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes: I'm wondering how many of the other coreutils that use this freopen trick are affected, Five more: head, tac, tail, tee, and tr. and whether we should use a wrapper function rather than duplicating all the logic. My kneejerk reaction is to duplicate

Re: cat bug on cygwin

2007-05-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paul Eggert on 5/30/2007 4:46 PM: Eric Blake [EMAIL PROTECTED] writes: I'm wondering how many of the other coreutils that use this freopen trick are affected, Five more: head, tac, tail, tee, and tr. The full list: cat,

Re: Cat not showing last lines in file

2007-03-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Dombrowski, Al on 3/15/2007 10:15 AM: Hello, Cat is not showing the last lines in a file consistently. Sometimes it does and most of the times it doesn't. This has always been the case for me for months now. I thought this issue

Re: 'cat' doesn't check close(STDOUT_FILENO)'s return value

2005-12-14 Thread Jim Meyering
Paul Eggert [EMAIL PROTECTED] wrote: On some operating systems, notices of output errors are sometimes delayed until you close the file. However, in the normal case coreutils 'cat' doesn't check the return value from 'close(STDOUT_FILENO)'. I installed this patch. 2005-12-13 Paul Eggert

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-12 Thread Andreas Schwab
Peter Volkov Alexandrovich [EMAIL PROTECTED] writes: The last question I have, where can I download coreutils-5.3.0? Or this is the future release? See http://lists.gnu.org/archive/html/coreutils-announce/2004-03/msg1.html. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-11 Thread Andreas Schwab
Peter Volkov Alexandrovich [EMAIL PROTECTED] writes: I should get the same string again. But if I misstyped and then edited my words in russian language with backspace then next line differs from the previous. So if I type: backspace the first line will be: but the second Try

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-11 Thread Dmitry V. Levin
Hi, On Tue, Jan 11, 2005 at 11:29:40PM +0300, Peter Volkov Alexandrovich wrote: I've changed my locale to ru_RU.utf8 and now I have some problem is with cat utilty. When I do: $ cat words in russianenter I should get the same string again. But if I misstyped and then edited my words in

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-11 Thread Dmitry V. Levin
On Tue, Jan 11, 2005 at 11:00:15PM +0100, Andreas Schwab wrote: Peter Volkov Alexandrovich [EMAIL PROTECTED] writes: I should get the same string again. But if I misstyped and then edited my words in russian language with backspace then next line differs from the previous. So if I type:

Re: cat file dabbles in locales?

2004-05-08 Thread Jim Meyering
Dan Jacobson [EMAIL PROTECTED] wrote: Jim That set-up is performed (via setlocale) for internationalized diagnostics. Maybe only do the set-up once we intend to actually give a diagnostic (but I didn't look at the source, so probably never mind.) But what if the error is that we're out of an

Re: cat /usr/X11R6/bin/xmodmap

2004-04-25 Thread Bob Proulx
Alexander Orlov wrote: If I type cat /usr/X11R6/bin/xmodmap I get into cryptical mode which can't be canceled in the normal way (Ctrl+C). Thank you for your report. But you are not seeing a bug. The terminal emulator you are using apparently is a smart terminal and reacts to escape

Re: Cat and -u, unbuffered output support

2003-06-25 Thread Bob Proulx
Paul Jarc wrote: Bob Proulx wrote: % stty raw % cat -u fi This may not work; the interactive shell may reset the tty modes after each command, so the first stty would bhave no effect. For shells that do that command line editing such as bash, zsh, etc. which reset the mode they

Re: Cat and -u, unbuffered output support

2003-06-24 Thread Scott Bronson
Thanks for the reply, Bob! Maybe I'm misunderstanging the meaning of unbuffered. First, the vital statistics: [EMAIL PROTECTED]:~$ cat --version cat (coreutils) 5.0 ... [EMAIL PROTECTED]:~$ uname -a Linux vesper 2.4.20 #9 Sun Mar 30 11:29:43 PST 2003 i686 GNU/Linux Now, I want

Re: Cat and -u, unbuffered output support

2003-06-24 Thread Bob Proulx
Scott Bronson wrote: Thanks for the reply, Bob! Maybe I'm misunderstanging the meaning of unbuffered. First, the vital statistics: [EMAIL PROTECTED]:~$ cat --version cat (coreutils) 5.0 Very good. Thanks. Here's an illustration that can be run in a single shell: % mkfifo fi

Re: Cat and -u, unbuffered output support

2003-06-24 Thread Paul Jarc
[EMAIL PROTECTED] (Bob Proulx) wrote: % stty raw % cat -u fi This may not work; the interactive shell may reset the tty modes after each command, so the first stty would bhave no effect. This might work: % sh -c 'stty raw; cat -u fi; stty sane' Either Stevens with Advanced

Re: Cat and -u, unbuffered output support

2003-06-23 Thread Bob Proulx
Scott Bronson wrote: Hello. It is driving me nuts that GNU cat doesn't support the -u option. It it makes it difficult to port software from other Unix systems to GNU. But '-u' *is* accepted as a valid option to cat. It is ignored since Write bytes from the input file to the standard output