On Tuesday 2012-05-29 11:16, Karl Eichwalder wrote:
Jan Engelhardt <jengelh@inai.de> writes:
On Tuesday 2012-05-29 09:48, Stephan Kulow wrote:
I don't know why kiwi's initrd calls an external tool for it either :)
haveKByte=`cat /proc/meminfo | grep MemFree | cut -f2 -d:| cut -f1 -dk`
cat has been obsolete for these kind of tasks, you can just use
grep MemFree /proc/meminfo
...
A grep and 2 cut commands? That's asking for awk (assuming that awk is available in your enviroment:
awk '/^MemFree:/ {print $2}' /proc/meminfo
or
awk '/^MemFree:/ {print $2; exit}' /proc/meminfo
A sh and 10 awk commands? That's asking for [...] -which either expands to Perl, since it is available most of the time anyway, or you end up writing in C like systemd. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org