A much better solution would be the one implemented in fusioninventory: don't bother with the dmidecode version just to be able to filter the result, but run it once without option, so as to catch the full output, and cache the result.
If you're insterested, the parsing code is available there (getInfosFromDmidecode): https://github.com/guillomovitch/fusioninventory-agent/blob/master/lib/FusionInventory/Agent/Tools.pm
A much better solution would be the one implemented in fusioninventory: don't bother with the dmidecode version just to be able to filter the result, but run it once without option, so as to catch the full output, and cache the result.
If you're insterested, the parsing code is available there (getInfosFromDm idecode) : /github. com/guillomovit ch/fusioninvent ory-agent/ blob/master/ lib/FusionInven tory/Agent/ Tools.pm
https:/