paste without temporary files in Unix paste without temporary files in Unix unix unix

paste without temporary files in Unix


You do not need temp files under bash, try this:

paste <(./progA) <(./progB)

See "Process Substitution" in the Bash manual.


Use named pipes (FIFOs) like this:

mkfifo fAmkfifo fBprogA > fA &progB > fB &paste fA fBrm fA fB

The process substitution for Bash does a similar thing transparently, so use this only if you have a different shell.


Holy moly, I recent found out that in some instances, you can get your process substitution to work if you set the following inside of a bash script (should you need to):

set +o posix

http://www.linuxjournal.com/content/shell-process-redirection

From link:"Process substitution is not a POSIX compliant feature and so it may have to be enabled via: set +o posix"I was stuck for many hours, until I had done this. Here's hoping that this additional tidbit will help.