sensors|grep CPU:|perl -e '$a = <>; if($a =~ m/\+([\d\.]+)/){ print $1; }' > cpu
Jon > which gives me a file called cpu with contents: - > CPU: +53.4?C (limit = +120?C, hysteresis = +100?C) > > the problem im having is that i need the file to just contain: - > 53.4 > > or whatever the value was when sensors was run. i've tried variations of > this command like: - > > sensors |grep CPU: |grep -o +##.#? |cat > cpu > > but i just cant find a way to get it to do what i want. If any of you > know the command that will give me the output I'm looking for, or know a > different way of doing it, that would be fantastic. > > Thanks in advance, > Adam Bowns > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED] > https://www.redhat.com/mailman/listinfo/redhat-list > -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list