On Thu, Sep 27, 2012 at 12:13:18PM -0500, Peng Yu wrote:
> function cmd1 {
> if [ $cnd1 ]
> then
> blah1
> else
> cat
> fi
> }
> Because using cat is not efficient, a more efficient way might be.
Why do you think cat is not efficient? I promise it'll run faster than
a pure-bash while/read/printf loop for any nontrivial input.