![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| count no of arguments passed to a function | satish@123 | Shell Programming and Scripting | 2 | 05-21-2008 02:16 AM |
| counting no of argumnts passed to a function | satish@123 | Shell Programming and Scripting | 4 | 05-21-2008 12:15 AM |
| read values from ps -ef into variables in ksh? | JamesByars | Shell Programming and Scripting | 8 | 01-13-2008 05:12 AM |
| checking parameter values passed to script | ammu | UNIX for Dummies Questions & Answers | 2 | 10-05-2007 09:35 AM |
| Korn Shell Script - Read File & Search On Values | run_unx_novice | Shell Programming and Scripting | 2 | 06-15-2005 04:20 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
How to read values that are passed to the shell function in ksh.
In ksh shell,
There is a function f1. function f1 { How to read here?? .... .... } I am passing values to fuunction f1 as f1 "A" "B" Please tell me how to read the passed values in function f1. Advance Thanks & Regards Prashant |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
There are probably hundred sof tutorials on the Korn shell available on the Web.
Just use your favorite search engine to find "ksh tutorial function" Code:
#!/usr/bin/ksh
function foo
{
echo "Argument 1: $1"
echo "Argument 2: $2"
echo "All agruments: $*"
}
bar()
{
echo "Argument 1: $1"
echo "Argument 2: $2"
echo "All agruments: $*"
}
foo one two
bar three four
|
|
#3
|
||||
|
||||
|
Thanks fpmurphy.
Quote:
|
||||
| Google The UNIX and Linux Forums |