How can I use the integer value returned by a function in shell script that takes some arguments as input?
I am using the following code:
fun()
{
echo "hello ${1}"
return 1
}
a= fun 2
echo $a
I am not sure how should I call this function. I tried the methods below, bot none of them seems to work:
a= fun 2
a=`fun 2`
a=${fun 2}