Good demo of how to use variables in an awk expression
memused()
{
free -b | awk '/Mem/{ total=2; available=NF; print "MemoryUse:",(100.0*(total/available))"%"; }';
};
memavail()
{
free -b | awk '/Mem/{ total=2; available=NF; print "MemoryAvail:",(100.0*(1.0-(total/available)))"%"; }';
};