Script Shell code #! /Bin/bash-PATH =/usr/bin:/usr/sbin d = 'mktemp/tmp/d. xxxxxxxx' | d =/tmp/d. $ s = 'mktemp/tmp/s. XXXXXXXXXX '| s =/tmp/s. $ l = 'mktemp/tmp/l. xxxxxxxx' | l =/tmp/l. $ lb = 'mktemp/tmp/l. XXXXXXXXXX '| l =/tmp/lb. $ t = 'mktemp/tmp/t. XXXXXXXXXX '| t =/tmp/t. $ dmidecode> $ d cat $ d | grep-I 'SIZE' | grep-evi' (rom | maximum | runtime | installed size | enabled size | range | page) '> $ s cat $ d | grep-I 'locator' | g Rep-I 'dimm '> $ l cat $ d | grep 'Bank locator' | grep-Ev' (BAD INDEX) | (Not Specified) '> $ lb n = 'cat $ l | wc-l 'cat $ d | grep-I' speed: '| grep-evi' (max | current | rpm | nominal) '| tail-$ n> $ t lbcheck = 'cat $ lb | wc-l' if [$ lbcheck-eq 0]; then paste $ l $ s $ t | sed-e's/^ [[: space:] * // G'-e's/No Module Installed/No Module/G'> $ d else paste $ l $ lb $ s $ t | sed-e's/^ [[: space:] * // G'-e's/No Modu Le Installed/No Module/G'> $ d fi IFS = "" while read line do echo $ line | grep "No Module" 1>/dev/null 2> & 1 if [$? -Ne 0]; then echo-ne '\ 033 [32m' echo $ line else echo-ne' \ 033 [0m' echo $ line fi done <(cat $ d) echo-ne '\ 033 [0m' rm-rf $ d $ s $ l $ lb $ t