#!/bin/bash read total used <<<$(free -m | awk '/Mem:/ {print $2, $3}') echo "{\"text\":\" ${used}M/${total}M\",\"tooltip\":\"Memory Usage\"}"