zsh-users
 help / color / mirror / code / Atom feed
* multiple redirections and flushing
@ 1997-06-10 13:19 Vincent Lefevre
  1997-06-10 14:06 ` Zefram
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 1997-06-10 13:19 UTC (permalink / raw)
  To: zsh-users

How can I tell zsh to automatically flush the buffers when using
multiple redirections?

For instance, if I don't use any redirection, I get one line after the
other in STDOUT, but if I redirect STDOUT like this
prg >results >&2
I only get the results when the program terminates.

-- 
Vincent Lefevre, vlefevre@ens-lyon.fr | Acorn Risc PC, StrongARM @ 202MHz
http://www.ens-lyon.fr/~vlefevre      | 20+1MB RAM, Eagle M2, TV + Teletext
PhD in Computer Science, 1st year     | Apple CD-300, SyQuest 270MB (SCSI)
-----------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multiple redirections and flushing
  1997-06-10 13:19 multiple redirections and flushing Vincent Lefevre
@ 1997-06-10 14:06 ` Zefram
  1997-06-11  8:26   ` Vincent Lefevre
  0 siblings, 1 reply; 3+ messages in thread
From: Zefram @ 1997-06-10 14:06 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: zsh-users

Vincent Lefevre wrote:
>For instance, if I don't use any redirection, I get one line after the
>other in STDOUT, but if I redirect STDOUT like this
>prg >results >&2
>I only get the results when the program terminates.

That's up to the program, `prg' in this case.  All zsh does is open
the file.  You might find the `script' command to be of some use, if
you can't modify the program.

-zefram


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multiple redirections and flushing
  1997-06-10 14:06 ` Zefram
@ 1997-06-11  8:26   ` Vincent Lefevre
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 1997-06-11  8:26 UTC (permalink / raw)
  To: zsh-users

On Tue, Jun 10, 1997 at 03:06:33PM +0100, Zefram wrote:
> That's up to the program, `prg' in this case.  All zsh does is open

Thanks, this works (as the program is a perl script, I could add
a "$| = 1;"). I was just a bit surprised because when there is no
redirection, the results are written to the screen one line after
the other, even with no "$| = 1;".

> the file.  You might find the `script' command to be of some use, if
> you can't modify the program.

-- 
Vincent Lefevre, vlefevre@ens-lyon.fr | Acorn Risc PC, StrongARM @ 202MHz
http://www.ens-lyon.fr/~vlefevre      | 20+1MB RAM, Eagle M2, TV + Teletext
PhD in Computer Science, 1st year     | Apple CD-300, SyQuest 270MB (SCSI)
-----------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-06-11  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-10 13:19 multiple redirections and flushing Vincent Lefevre
1997-06-10 14:06 ` Zefram
1997-06-11  8:26   ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).