I want to get the third column of the last row of the output of free command. So far I have this:free | tail -n 1 | (here I need to printf the second column value)How I do that?
How to get a specific field of a string
text processing
Using just awk:free | awk  'ORS=; END {print $2}'Explanation:END prints just the last line{print $2} prints just the second columnORS= removes the trailing newlineor, another way with awk:free | awk  'END {printf %s, $2}'