title: Shell scripting: cat vs echo for output
body: <p>I've written a small script in bash that parses either the provided files or stdin if no file is given to produce some output.  What is the best way to redirect the parsed output to stdout (at the end of the script the result is stored in a variable).  Should I use <code>cat</code> or <code>echo</code>, or is there another preferred method?</p>