Article 5GGPG How to use awk command?

How to use awk command?

by
pad001
from LinuxQuestions.org on (#5GGPG)
Hi Linux experts.
Please I am trying filter the contents of the 'free -m' command using the 'awk' to display column 2(used), and column 3(free) as well as the values directly beneath them but keep failing.
#free -m
total used free shared buff/cache available
Mem: 1458 513 509 11 435 767
Swap: 2047 0 2047

#free -m |head -1 |awk '{print$2,$3}'
used free

I want values of the second line under column used, and free

thank you for your help!!latest?d=yIl2AUoC8zA latest?i=S_qcm_3z2cs:CPDYV20QQcQ:F7zBnMy latest?i=S_qcm_3z2cs:CPDYV20QQcQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=S_qcm_3z2cs:CPDYV20QQcQ:gIN9vFwS_qcm_3z2cs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments