View Single Post
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#15
Originally Posted by timoph View Post
I'll start with something rather simple to get this going.

Code:
echo `head -2 < /proc/meminfo | awk '{print $2}' | sort -n` | awk '{printf("You have $1 kb of $2 kb free memory")}'
The above can be simplified even more by omitting the "<" after the "head -2", omitting the " | sort -n", and swapping $1 and $2.

(Of course, the $n must be replaced with %i, and listed after the output string, as mentioned by fnordianslip above.)
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.

Last edited by j.s; 2010-08-21 at 18:23. Reason: corrected typographic error (> to <)
 

The Following User Says Thank You to j.s For This Useful Post: