c = func
вы пытаетесь сделать вне этой зоны видимости, где func просто не определена. function f() {
let x = 1;
let counter = 0;
function g() {
return counter++;
}
return g;
}
Math.round(value / 5) * 5
a[0] <= b[1] && a[1] <= b[0]
> smartctl --scan
/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
> smartctl -i /dev/sda
=== START OF INFORMATION SECTION ===
Device Model: ADATA SU650
Serial Number: 2J1020138121
LU WWN Device Id: 5 000000 000000000
Firmware Version: P180831a
User Capacity: 120 034 123 776 bytes [120 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Apr 12 12:35:28 2021 RTZ
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
>smartctl -A /dev/sda
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 0
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 17127
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 20
167 Unknown_Attribute 0x0022 100 100 000 Old_age Always - 0
168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
169 Unknown_Attribute 0x0013 086 086 010 Pre-fail Always - 13631540
173 Unknown_Attribute 0x0012 200 200 000 Old_age Always - 2405225267832
175 Program_Fail_Count_Chip 0x0013 100 100 010 Pre-fail Always - 0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 100 100 020 Pre-fail Always - 1384
192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 10
194 Temperature_Celsius 0x0022 057 057 030 Old_age Always - 43 (Min/Max 19/68)
231 Temperature_Celsius 0x0033 058 058 005 Pre-fail Always - 42
233 Media_Wearout_Indicator 0x0032 100 100 000 Old_age Always - 157243890560
234 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 165783833856
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 60070151396
242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 16178895548
> for /F "tokens=10" %a in ('smartctl.exe -A /dev/sda ^| find "Power_On_Hours"') do @echo %a
17127
Если посмотрите, что именно получаете, то увидите, что строку XML зачем-то пропустили через htmlspecialchars.
Значит, чтобы начать с ней работать, надо пропустить её через html_entity_decode.