Trying to write a script in Unraid using hdd smart values. How Can I parse the RAW_VALUE of a sensor? In my case it is 45
I can get all the specific sensor data using:
smartctl -A /dev/sdg | grep Airflow_Temperature_Cel
output:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
190 Airflow_Temperature_Cel 0x0032 055 051 000 Old_age Always - 45
I am just trying to get the RAW_VALUE value of 45 to input into a variable.
Any help appreciated.
1
Of course got it right after I posted. In case anyone is wondering below is what I did.
smartctl -A /dev/sdg | grep Airflow_Temperature_Cel | grep -o '...$'