hi
i have a function
abc
{
//from this function i am passing args to antoher function like
def a b c j k l
}
now i want to count the no of args coming to def() function and iterate over those values
is there any way to do this one
please help
hi
i have a function
abc
{
//from this function i am passing args to antoher function like
def a b c j k l
}
now i want to count the no of args coming to def() function and iterate over those values
is there any way to do this one
please help
$ cat test.sh
echo 'num of args: '$#
for arg in "$@"; do echo 'arg: '$arg; done
$ sh test.sh a 2 c 4
num of args: 4
arg: a
arg: 2
arg: c
arg: 4