How to prevent line wrapping of hex data?

This is a discussion on How to prevent line wrapping of hex data? within the SNMP Coders forums, part of the Networking and Network Related category; Hi All, Searching through the google returned no result, so I'm asking directly to the list. I think net-...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2005
Yusuf Kürşat Tuncel
 
Posts: n/a
Default How to prevent line wrapping of hex data?

Hi All,

Searching through the google returned no result, so I'm asking directly
to the list. I think net-snmp-coders list would be appropriate for this
question.

Is there any way to prevent line wrapping of hex data from the output of
snmpwalk?

I'm writing a script based on a mib var, the output is like this:

snmpwalk -v1 -c public -OQbxv [ip_address] [relevant_mib_var_here]

"01 00 00 00 03 6B 75 72 73 61 74 2D 72 61 64 69
75 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 01 00 01 01 56 52 D2 78 21 80 01 78
21 80 01 03 00 00 64
"
(wrapped exactly at 16th octet of the returned value)

What I want is to display this data in one line (for easier parsing)
"01 00 00 00 03 6B 75 72 73 61 74 2D 72 61 64 69 75 73 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 01 56 52 D2 78 21 80 01 78
21 80 01 03 00 00 64"

Is there anyway to prevent this line wrapping behaviour of snmpwalk via
option switches or do I need to "hack" the source code to get the
desired effect?

best regards,
kursat.


-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0