All pastes #968483 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-03 01:46 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";
my $input;
{
    local $/;
    $input = <SENSORS>;
}
while( $input =~ /^k8temp-pci-00c3(.*?)^k8temp-pci-00cb/sm ){
    print "Match:$1\n";
}