All pastes #968462 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-03 01:31 UTC
rendered paste body
#!/usr/bin/perl

#
#sample of some of the output
#
#k8temp-pci-00c3
#Adapter: PCI adapter
#Core0 Temp:
#             +42 C
#
#k8temp-pci-00cb
#Adapter: PCI adapter
#Core0 Temp:
#             +42 C

my $sensors="/usr/bin/sensors";
$/ = '';
open ( SENSORS, "$sensors |") || die "Cannot run sensors\n";
while (<SENSORS>){
     while( /^k8temp-pci-00c3(.*?)^k8temp-pci-00cb/sm ){
        print "Match:$1\n";
     }
}