sensors output has 2 temp1: display each

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
homerscousin

sensors output has 2 temp1: display each

Post by homerscousin »

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]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
titetanium
Level 2
Level 2
Posts: 81
Joined: Mon Jun 18, 2012 4:26 pm

Re: sensors output has 2 temp1: display each

Post by titetanium »

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
homerscousin

Re: sensors output has 2 temp1: display each

Post by homerscousin »

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.
Locked

Return to “Compiz, Conky, Docks & Widgets”