I have a script to add IPv6s
. But I need to figure out how to assign the output of the command to a variable and then use it further in the code.
This is what I have
ret=$(/sbin/ifconfig eth0 inet6 add $IPV6PROXYADD)
if [ "$ret" ];
then
returnflag="error"
echo "$ret" >> "/root/mypath/ipv6/ipadderror.log"
fi
But the script would output the result to screen instead of assigning it to the variable. What am I doing wrong here?