![]() | |||||||||||||
Messages in this thread |
Joshua Hudson wrote:
> Oh, and the original code that found this long ago:
> grep MemFree /proc/meminfo | read J MEMFREE K
> case $MEMFREE in
> ...
> (MEMFREE used several times below)
>
> Had to convert to:
>
> MEMFREE=`grep MemFree /proc/meminfo | (READ J M K ; echo $M)`
> case $MEMFREE in
> ...
Pure-shell implementation:
while read J M K ; do
case "$J" in
MemFree:)
MEMFREE="$M"
esac
done </proc/meminfo
case $MEMFREE in
...
--
Alexander E. Patrakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2006-06-15 07:05 [from the cache] ©2003-2008 | |||||||||||||