title: Efficient way to pipe file contents to program
body: <p>Assume that we have command <code>cmd</code> that only takes input through a pipe. Given a filename <code>file.txt</code>, what is the most efficient way to pipe this into the command? (I assume <code>cat file.txt | cmd</code> is not very efficient ..)</p>