Per http://mywiki.wooledge.org/BashFAQ/002, it seems this can not be done in bash. Is it possible in zsh? If not, is a named pipe advantageous to a temporary file? Is there a way to avoid disk IO (which will probably slow things down considerably)?