rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Question about redirection
@ 1992-07-15 10:44 malte
  1992-07-15 11:00 ` Tim.Goodwin
  0 siblings, 1 reply; 6+ messages in thread
From: malte @ 1992-07-15 10:44 UTC (permalink / raw)
  To: rc

Could some kind soul explain this to me ?
	{ echo stderr >[1=2]; echo stdout } >[2=1] > /dev/null
	stderr
	{ echo stderr >[1=2]; echo stdout } |[2=1] cat > /dev/null
	stdout
	<waiting for input>

Malte.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Question about redirection
@ 1992-07-16 10:13 malte
  1992-07-16 16:18 ` Scott Schwartz
  0 siblings, 1 reply; 6+ messages in thread
From: malte @ 1992-07-16 10:13 UTC (permalink / raw)
  To: rc

I'm sorry for not being precise with my question. What I want to know
is why
	{ echo stderr >[1=2]; echo stdout } >[2=1] > /dev/null
and
	{ echo stderr >[1=2]; echo stdout } |[2=1] cat > /dev/null

although lexically similar, differ in their semantics, while

	{ echo stderr >[1=2]; echo stdout } |[2=1] cat > /dev/null
and
	{ echo stderr >[1=2]; echo stdout } >[2] /dev/null

look quite different, but are semantically equal. I became aware of this when
I was asked about something similar by a beginner. I feel it is hard to
explain why >[n=m] differs from |[n=m].

Malte.



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

end of thread, other threads:[~1992-07-21  2:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-07-15 10:44 Question about redirection malte
1992-07-15 11:00 ` Tim.Goodwin
1992-07-16 10:13 malte
1992-07-16 16:18 ` Scott Schwartz
1992-07-21  0:45   ` John Mackin
1992-07-21  2:06     ` Scott Schwartz

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