[Top][All Lists]

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

Re: lost output from asynchronous lists

From: Sven Mascheck
Subject: Re: lost output from asynchronous lists
Date: 1 Nov 2008 23:21:01 -0000
User-agent: tin/1.8.2-mod ("Elizium") (UNIX)

Eric Blake wrote:
> According to Stephane Chazelas on 10/29/2008 3:32 AM:

>>>>  : > stdout > stderr
>>> For shell portability, I'll write the first line as
>>>   : > stdout
>>>   : > stderr
>>> though.
>> Why?
> It fails on old Ultrix sh, which can't redirect the same fd more than once
> in a single statement.  But that platform is relatively dead these days.

More detailed:

- It actually works (also on Ultrix) but it is not robust
   in any traditional Bourne shell (except where fixed by the vendor):

  $ echo x y > file1    > file2 # ok, all output in file2
  $ echo x   > file1 y  > file2 # not ok, all output in file1 instead of file2

- the abovementioned repeated redirecting fails in other constructs:
  $ eval 'echo x > file1' > file2
  illegal io

  This was fixed with SVR2 (thus on Ultrix with sh5).

[OT on bug-bash but I'll keep the cc]

reply via email to

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