Echo only text after a specific number of bytes
I've got an SNMP call which echo's the status of a tape drive, this is a string of text which will vary a great deal (e.g one time it might read "no errors" and another time it might read "tape drive x has a fault due to y we recommend you z").
I usually just do awk '{print $4}' for my snmp calls but seeing as the length is unknown, whats the best way to do this? Does awk have a 'print everything after $4' command or something? I also know the text will only appear after a set number of characters, would it be possible to print everything after 64 characters for example? I guess sed or something could (possibly) be capable of doing this. Example below: Code:
snmpwalk -v1 -c public 127.0.0.1 1.3.6.1.4.1.674.10893.2.102.3.1.1.24.1 |
Quote:
Code:
snmpwalk -v1 -c public 127.0.0.1 1.3.6.1.4.1.674.10893.2.102.3.1.1.24.1 | \ |
Quote:
|
Quote:
Code:
snmpwalk -v1 -c public 127.0.0.1 1.3.6.1.4.1.674.10893.2.102.3.1.1.24.1 | \ Code:
STRING: "No error" |
All times are GMT -5. The time now is 01:28 AM. |