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 »

If you still didn't find what you're looking for, you can search this website below: