bug-autoconf
[Top][All Lists]
Advanced

[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: Tue, 4 Nov 2008 02:10:07 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Nov 02, 2008 at 08:53:15AM +0000, Stephane Chazelas wrote:
> On Sat, Nov 01, 2008 at 11:21:01PM -0000, Sven Mascheck wrote:

>> - 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

> is it the order of the redirections that is not respected in
> those old Bourne shells, or is it that only some of the
> redirections are performed?

It looks as if just the order is wrong.

> Would
> : > file1 > file2
> or
> : > file1 x > file2
> create (and truncate) both file1 and file2 in any case?

Good idea, but:

a) : > file

V7 ... SVR1:    file not created
SVR2:           file created
                (probably due to: svr2 fixed redirection of built-ins generally)

b) : > file1 x > file2

(like above, no files created)

c) echo  x > file1  y > file2
V7...SVR2:      all output in file1, and: file2 truncated


> Would that fork a process, BTW in those old shells?

Not with the null command.


> Maybe a better way would be
> exec 3> file1 3> file2 3>&-
> (to truncate those files)

This actually truncates both files in V7, Sys3, SVR1 and SVR2.
-- 
Sven




reply via email to

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