Issue
free | grep Mem | awk '{print $4/$2 * 100.0}'
I want to remove the decimal places from this output.
Solution
free | grep Mem | awk '{print $4/$2 * 100.0}' | cut -d. -f1
or
free | grep Mem | awk '{print int($4/$2 * 100.0)}'
Answered By - robobrobro Answer Checked By - Senaida (WPSolving Volunteer)