<?xml version="1.0" encoding="windows-1252"?>
<node id="1010738" title="Re^3: grabbing dmidecode memory data - there's got to be a better way" created="2012-12-28 14:41:33" updated="2012-12-28 14:41:33">
<type id="11">
note</type>
<author id="712372">
kennethk</author>
<data>
<field name="doctext">
You could simplify the split to &lt;c&gt;\n\n+&lt;/c&gt; or something similar, but then you need to modify something else to keep the records newline separated.  I'm willing to go to pretty extreme lengths to keep &lt;c&gt;print if /RAM socket/ &amp;&amp; !/Not Installed/&lt;/c&gt; clean just because of personal taste. TIMTOWTDI.
&lt;p&gt;&lt;c&gt;dmidecode | perl -e 'undef $/;/RAM socket/ &amp;&amp; !/Not Installed/ &amp;&amp; s/$/\n\n/ &amp;&amp; print for split /\n\n+/, &lt;&gt;'&lt;/c&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-712372"&gt;
&lt;hr /&gt;
&lt;p&gt;#11929 First ask yourself `How would I do this without a computer?'  Then have the computer do it the same way.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1010730</field>
<field name="parent_node">
1010737</field>
</data>
</node>
