SIMPLE FUNCTION USING SHELL


SOURCE CODE:
program()
{
echo “ 1 is $1 ”
echo “ 2 is $2 ”
a= “ goodbye ”
}
a=hello
b=world
program $a $b
echo “ a is $a ”
echo “ b is $b ”

OUTPUT:
[examuser35@localhost Jebastin]$ sh function.sh
1 is hello
2 is world
a is goodbye
b is world
Previous
Next Post »

Still not found what you are looking for? Try again here.