Here's an example using zsh (I assume it's the same using bash, but
different using tcsh or sh): [...]
This uses the <() operator. [...]
There's another, similar operator that does force it to use temp files,
but I can never remember what it is :) [...]
Just for the archives, The =() operator puts the output to a temp file
and returns the filename to the main command.  It has to wait for the
subshell to finish before running the main command, though.


Ah, thanks, I'll try to remember that this time :)

Note that the =() operator, because it uses regular files, doesn't have the issue that some programs won't know how to deal with it (that is, because they are regular files, they support things like fseek() etc). The downside, as Dan said, is that the entire command line isn't executed until all of the subshells within =() operators complete (so the example I gave could take a long time to have any output). Also note that the =() operator will put its temp files in / tmp by default (unless you set your shell to put them elsewhere), so if you have a command with a lot of output, make sure that your /tmp can take all of it.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to