Bash: Process Substitution
"Process substitution feeds the output of a process (or processes) into the stdin of another process." Source
The output of arbitrary commands can be treated like a file by surrounding with <( ).
Example on how to compare a remote file with a local one:
diff my_local_file <(ssh foo@bar.local "cat my_remote_file")
Compare differences of compiler optimizations at assembler level:
meld <(clang -S my_file.c -O2 -o -) <(clang -S my_file.c -O3 -o -)
Written by Matthias Bartelt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#