bash - how to extract the remaining memory from free using awk? -


i need extract available memory output free , thought use awk , came free | awk '{print $4}'. gives me output like:

$ free | awk '{print $4}' shared 365296 1273812 3931364 

mind, title shared isn't title of these numbers, numbers free (/usr/bin/free has no title in first column, numbers free appear in 4th column title reported 5th). however, having this, how return second line? i'm not interested in rest now.

free | awk 'nr==2 {print $4}' 

nr, row/line number


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -