Parsing the attribute table from smartctl -A output
Preet <[email protected]> Mon, 28 Nov 2016 22:02:33 -0500
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <CAPOvtuDOKCpkoiCLYO1z+wGgGrc4NYUX3y1+ROGaRosMYU+6+A@mail.gmail.com> |
Hi all, I'm trying to parse the attribute table that's printed when smartctl is called with the -A option. Specifically I'd like to get the data for each 'cell' under the row: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE I know that entries under RAW_VALUE can have multiple pieces of information since some vendors pack multiple things in the raw value. ie a RAW_VALUE entry may look like "36 (Min/Max 34/38)" However can I be sure there's only ever one token (contiguous string without any in-between whitespace) for the rest of the headings? I haven't come across any examples where there's more than one, but I want to be sure. Pris ------------------------------------------------------------------------------