Named pipes
Published by peter July 23rd, 2006 in linux.Last friday the guy behind the twinview setup on the desk in front of me tipped me on named pipes. Bash uses named pipes in a really neat way. When you enclose a command in parenthesis, the command is actually run in a subshell; that is, the shell clones itself and the clone interprets the command(s) within the parenthesis. Since the outer shell is running only a single command, the output of a complete set of commands can be redirected as a unit.
Since I learned this I mostly used it in combination with the diff command:
diff <(curl http://www.liekeensofie.nl//scripts/lightbox.js)
<(curl http://www.maas-frensch.com/sjoerd/wp-content/plugins/wp-lightboxJS/lightbox.js.php)
The above compares two webpages without the need of temporary files!




















1 Response to “Named pipes”
Please Wait
Leave a Reply