3 ms·
One super-useful bash feature is anonymous named pipes, which allows the equivalent of multiple pipe "arguments" to a single command. Instead of: echo a b c >
by DavidSJ 14y ago
One super-useful bash feature is anonymous named pipes, which allows the equivalent of multiple pipe "arguments" to a single command.
Instead of:
echo a b c > /tmp/foo
echo d e f > /tmp/bar
diff /tmp/foo /tmp/bar
Just do:
diff <(echo a b c) <(echo d e f)
- dhamidi 14y agoThat feature is actually named "Process Substitution". "anonymous named pipes" is contradictory, since anonymous means that something has no name.
- DavidSJ 14y agoYeah, poor wording on my part. They do have a name, but normally you don't care about it.
- chrisaycock 14y agoThis feature is known as "process substitution": http://tldp.org/LDP/abs/html/process-sub.html http://tldp.org/LDP/abs/html/process-sub.html