From 20a73754f026fd713a0b40720712dba90f8e635e Mon Sep 17 00:00:00 2001 From: terminalforlife Date: Tue, 27 Oct 2020 00:56:44 +0000 Subject: [PATCH] Add basic parsing example for sensors(1) --- sheets/sensors | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sheets/sensors b/sheets/sensors index be50ca1..a4200e9 100644 --- a/sheets/sensors +++ b/sheets/sensors @@ -7,3 +7,7 @@ sensors -f # Display sensor information in raw output, suitable for parsing. sensors -u + +# Using sensors(1) and Perl, output only the CPU's fan speed (RPM). May not +# work on all system's software and/or hardcore configurations. +sensors | perl -ne '/^cpu_fan/ && print((split(" "))[1])'