* Florian Fainelli <[EMAIL PROTECTED]> [17.05.2008 18:40]: > This awk call calculates the half of the available RAM to later allow > base-files setting up a tmpfs of exactly of this size.
wouldt it be better (for understanding) to do something like:
-------------
while read NUL MEM NUL; do
[ "$MEM" != "used:" ] && {
MEM=$(( $MEM / 2 )) # filling var MEM with
break # the half of the avail mem
[bytes]
}
done </proc/meminfo
---------------
or
---------------
HALF_OF_AVAIL_MEM_IN_BYTES="$( while read NUL MEM NUL; do [ "$MEM" != "used:" ]
&& echo $(( $MEM / 2 )) && break; done </proc/meminfo )"
---------------
bye, Bastian.
signature.asc
Description: Digital signature
_______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
