help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] A do nothing function


From: Greg Wooledge
Subject: Re: [Help-bash] A do nothing function
Date: Thu, 27 Sep 2012 13:18:39 -0400
User-agent: Mutt/1.4.2.3i

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]