zsh-users
 help / color / mirror / code / Atom feed
* command1 >>(command2)
@ 2004-09-20  9:44 Atom 'Smasher'
  2004-09-20 16:08 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Atom 'Smasher' @ 2004-09-20  9:44 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

where is this documented?
 	command1 >>(command2)

i've found that it's useful for duplicating stdout into multiple commands:
 	command1 >>(command2) >>(command3)

 	{ echo X ; echo Y ; } >>(egrep X) >>(egrep -v X)

but there doesn't seem to be any control over whether command2 or command3 
finishes first. in the above example it ~usually~ outputs X then Y, but 
sometimes Y then X. is there any way to control this?

thanks...


  	...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	fascism: n. A system of government that exercises a dictatorship
 	of the extreme right, typically through the merging of state and
 	business leadership, together with belligerent nationalism.
 		-- The American Heritage Dictionary, 1983
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iQEcBAEBCAAGBQJBTqaYAAoJEAx/d+cTpVci/k8IAKeeN5Rq4d1Pk0rB0LG8gU3u
BXImuMPvRf/fHkhMJvwRY+0bEBLhtfR0VCrc9Ush2nrLRyZBCF1sjk2LxPGCjogj
AL7Ferbhfng2lqUffO3ZCy+Qqe5t0o7IEn5msgSYxODNbqEZszZVA15eIZ4h0Pxv
ZQVoPFlmWnXjM46lxqSndch0W7jLUyJukjD2eUJG3mmLrYfsOenSlFWfjicPZo+c
WorP4ZCtPwdRfb0g/nELfsKPeJSZiQ6q87kZTfgwQJxchc/pr3Ch218aSGZg2W83
lDBpEGklQJfgwb190RuU0PupCH7dSWMW2iYHkugPb71TZ4B8o1Hrl2nMEiRjSKA=
=SZ6/
-----END PGP SIGNATURE-----


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

* Re: command1 >>(command2)
  2004-09-20  9:44 command1 >>(command2) Atom 'Smasher'
@ 2004-09-20 16:08 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-09-20 16:08 UTC (permalink / raw)
  To: Atom 'Smasher'; +Cc: zsh-users

On Mon, 20 Sep 2004, Atom 'Smasher' wrote:

> where is this documented?
> 	command1 >>(command2)

That whole form of redirection, you mean?  Look in "man zshexpn" or the 
info doc section on "process substitution".

> i've found that it's useful for duplicating stdout into multiple commands
> but there doesn't seem to be any control over whether command2 or command3
> finishes first.

That's correct.  The commands in the parens are run as background jobs, 
which means they finish in whatever order the OS schedules them (which is
probably mostly dependent on when they stop receiving input).  Zsh has to 
let them run independently or I/O might deadlock, so you can't control it
except possibly with something like

	command1 >>(command2;sleep 1) >>(command3;sleep 2)


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

end of thread, other threads:[~2004-09-20 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-20  9:44 command1 >>(command2) Atom 'Smasher'
2004-09-20 16:08 ` Bart Schaefer

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