[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:13:58 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Sep 27, 2012 at 12:07:45PM -0500, Peng Yu wrote:
> For example, in pseudo code
>
> function cmd1 {
> if some condition
>
> }
I'm not sure what you're trying to say there. It's rather cryptic
without some context. Can you explain what is wrong with the "cat"
solution?
Avoid using "function" to define functions. It's non-POSIX syntax, and
therefore your script will only work in bash and not necessarily in sh.
Ksh also has "function" but it means something different, and therefore
makes things even MORE confusing.
So just use the standard definition syntax:
cmd1() {
}
- [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