Re: bash subroutine syntax question
- From: ToddAndMargo <ToddAndMargo@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 02:30:45 GMT
Bit Twister wrote:
On Fri, 31 Oct 2008 02:23:02 GMT, ToddAndMargo wrote:I do not understand. When I pass arguments to the subroutine,
they come out as $1, $2, $3 ...
Can you give me an example of what you are speaking?
Some light reading found here http://tldp.org/LDP/abs/html/index.html
Hi Bit,
http://tldp.org/LDP/abs/html/functions.html
states:
function function_name {
command...
}
or
function_name () {
command...
}
This second form will cheer the hearts of C programmers
(and is more portable).
As in C, the function's opening bracket may optionally
appear on the second line.
function_name ()
{
command...
}
It does not state what goes in the (). Just that it will "cheer
the hearts of C programmers".
Any idea what goes in the (), or is it just window dressing
to cheer up "C" programmers?
Great reference by the way!
-T
.
- References:
- bash subroutine syntax question
- From: ToddAndMargo
- Re: bash subroutine syntax question
- From: b.jeswine
- Re: bash subroutine syntax question
- From: ToddAndMargo
- Re: bash subroutine syntax question
- From: Bit Twister
- bash subroutine syntax question
- Prev by Date: Re: bash subroutine syntax question
- Next by Date: Re: bash subroutine syntax question
- Previous by thread: Re: bash subroutine syntax question
- Next by thread: Re: bash subroutine syntax question
- Index(es):