sensors output has 2 temp1: display each

Forum rules
Before you post please read how to get help

sensors output has 2 temp1: display each

Postby homerscousin on Sat Jun 30, 2012 7:09 pm

My sensors output from terminal has 2 lines beginning temp1:
The first temp1: is my north bridge temp
The second temp:1 is my GPU
The 2 temp:1s are seperated by a few other lines.

I need to capture the first and ignore the second and vise versa to display these 2 temps in conky.
Thought there might be a simple way to grep a 1st, 2nd, 3rd etc instance of a word or phrase?

This is a test:
Code: Select all
 [code select all: blah blah blah]
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.
homerscousin
Level 5
Level 5
 
Posts: 541
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

Linux Mint is funded by ads and donations.
 

Re: sensors output has 2 temp1: display each

Postby titetanium on Sat Jun 30, 2012 7:53 pm

Hi,

I have these two lines in my .conkyrc file the shows the core temps of my dual core cpus.
Code: Select all
${color2}${font StyleBats:size=16}K${color4}${font}   Temp-Core1: ${alignr}${hwmon temp 2}°C
${color2}${font StyleBats:size=16}K${color4}${font}   Temp-Core2: ${alignr}${hwmon temp 3}°C


Change Temp-Core# to the name of the sensors u want to display and change {hwmon sensors} to the sensor's name you want to track.

HTH,
titetanium
titetanium
Level 2
Level 2
 
Posts: 71
Joined: Mon Jun 18, 2012 4:26 pm

Re: sensors output has 2 temp1: display each

Postby homerscousin on Sat Jun 30, 2012 9:30 pm

Yeah, that's hwmon. I want to use the output from 'sensors', 2 different approaches I believe. I bet there is a way to do it with grep,sed,awk. I haven't found it yet. Thanks.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.
homerscousin
Level 5
Level 5
 
Posts: 541
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)


Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 1 guest