Tuesday, February 5, 2008

कोड to display, How can arguments be passed to a function in K SHELL script.

#!/usr/bin/ksh

## Code to display, How can arguments be passed to a function in K SHELL script.
## First $1 is the first input to this script. See below for passing on parameters to
## the functionA.
##
## Status: Tested.

xx=$1
yy=$1/logs/script.log

functionA()
{
a=$1
b=$2

echo $a
echo $b
}

functionA "Deepak" "Ranjan"
functionA $xx $yy

No comments: