when I enter a command in command line, I got the output like below. wanted to write a python program which will take the first line's only hex values as input (31 2e 30 38 2e 32 30 32 31 30 38 32 35 00 00 00) and convert to ASCII string.
$> set system cmd -i 33 -c raw 0x38 0x0b 0x06 -- command
Ipmi Response: 31 2e 30 38 2e 32 30 32 31 30 38 32 35 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Completion Code: Success
Tried this:
hex_str = "31 2e 30 38 2e 32 30 32 31 30 38 32 35 00 00 00"
string = ''.join(chr(int(i, 16)) for i in hex_str.split())
but not sure how to remove the "Ipmi response: " part from the string.