Hello all, new to these forums.
I'm trying to make a little Superkaramba theme.. I've came along ways from last night. I started looking up functions like "cut", and "awk" - and reading tons of examples(many from this very forum, which is why I registered)
So, my question is:
"sensors" returns for me:
Quote:
wasted@tronic:~$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +29.0°C
Core0 Temp: +22.0°C
Core1 Temp: +22.0°C
Core1 Temp: +19.0°C
|
Trying to extract the first line, "Core0" - the 29C one.
Here's what I have:
Code:
wasted@tronic:~$ sensors | grep Core0 | cut -d'+' -f2 | cut -d'.' -f1
29
22
How do I just solely return the 29? I was thinking about awk, and printing $1, but since there's two lines, it prints $1 from both lines.
Thanks for your help