coreutils
[Top][All Lists]
Advanced

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

Re: using tee with mkfifo


From: Peng Yu
Subject: Re: using tee with mkfifo
Date: Fri, 27 Apr 2012 16:38:59 -0500

On Fri, Apr 27, 2012 at 3:46 PM, Andreas Schwab <address@hidden> wrote:
>
>
> Peng Yu <address@hidden> writes:
>
>> Hi,
>>
>> The following code hangs there for ever. I don't understand what is
>> going on. Basically, I tee stdin to two named pipes and cat both
>> pipes. Could anybody let me know what I am wrong? Thanks!
>>
>> mkfifo a.suffix b.suffix
>> echo Hello World | tee a.suffix > b.suffix &
>
> Here the shell waits for a reader for b.suffix (tee hasn't even been
> started yet).
>
>> cat a.suffix b.suffix
>
> Here cat is waiting for a writer for a.suffix (b.suffix hasn't even been
> considered yet).

So I'll have to use. I think that this will not print the stdin one
after another, rather it will print interleaved stdin. Is there a way
to print stdin one after another without using an external file?

cat a.suffix &
cat b.suffix &

> Andreas.
>
> --
> Andreas Schwab, address@hidden
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>



-- 
Regards,
Peng



reply via email to

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