New answers tagged


Using sed Here is one way: $ sensors -Af | sed -n '2{s/°.*//; s/[^+-]*//; p; q}' +105.8 Or, using the same command inside command substitution to capture its output in a variable: temp=$(sensors -Af | sed -n '2{s/°.*//; s/[^+-]*//; p; q}') s/°.*// removes the first occurrence of the degree symbol, °, and everything after it. s/[^+-]*// removes ...


The site is down but the mailing list is active;

Top 50 recent answers are included