Operating System - HP-UX
1833694 Members
3665 Online
110062 Solutions
New Discussion

invoking a function with a parameter

 
Maciej_2
Occasional Contributor

invoking a function with a parameter

 
3 REPLIES 3
Steve Steel
Honored Contributor
Ralph Grothe
Honored Contributor

Re: invoking a function with a parameter

What is your question?

If you defined a function in your current shell or in a script then you simply invoke it like any unix command.

You can check with "typeset -f" which functions were defined (in sh-posix).

Without any sanity checks here definition is as simple as

# add() { echo $(($1 + $2)); }

and invocation

# add 3 5
8
Madness, thy name is system administration
aparna challagulla
Valued Contributor

Re: invoking a function with a parameter

hi Maciej,

where is ur question or is the subject the question. can u pl explain a little more.
aparna
If you don't have time to do it right you must have time to do it over