While this may not work for the full range of output in your particular case, maybe something like: dmidecode | perl -e 'undef $/;for (split /(?<=\n)\n+/, <STDIN>) {print if /RAM socket/ && !/Not Installed/}' would work. Keep it simple.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: grabbing dmidecode memory data - there's got to be a better way
by kennethk
in thread grabbing dmidecode memory data - there's got to be a better way
by Tommy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |