[Top][All Lists]
[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.
- [Help-bash] A do nothing function, Peng Yu, 2012/09/27
- Re: [Help-bash] A do nothing function, DJ Mills, 2012/09/27
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/27
- Re: [Help-bash] A do nothing function, Greg Wooledge, 2012/09/28
- Re: [Help-bash] A do nothing function, DJ Mills, 2012/09/28
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/28
- Re: [Help-bash] A do nothing function, Greg Wooledge, 2012/09/28
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/28
- Re: [Help-bash] A do nothing function, Stephane Chazelas, 2012/09/29
Re: [Help-bash] A do nothing function, Davide Brini, 2012/09/27