Ethereal-dev: Re: [Ethereal-dev] Hex dumpiong

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jason House <jhouse@xxxxxxxxx>
Date: Thu, 13 Feb 2003 10:30:50 -0500
Well,

gawk 'BEGIN{RS="\n\n"} {gsub("\n"," "); print "\n" $0 "\n"}'

works for me...

Actually, not entirely true... on cygwin, I had to do RS="\n\r\n"  Somehow,
the first command causes a mix of unix style and dos/windows style
newlines...
Either way, you should be able to get it to work.

"Singer, Geoffrey" wrote:

> This is more of a string manipulation question...
>
> We have a nice dump of only hex values, but how can I make that one
> complete line?  I like my lines long!
>
> Thanks all
>
> -----Original Message-----
> From: Jason House [mailto:jhouse@xxxxxxxxx]
> Sent: Thursday, February 13, 2003 4:02 PM
> To: Singer, Geoffrey
> Cc: Ethereal Development
> Subject: Re: [Ethereal-dev] Hex dumpiong
>
> Oops, I accidentally didn't do it to the list originally...
>
> tethereal -x | \
> gawk -F "  " '{if (length($1) == 4) print $2; else print $0}'
>
> "Singer, Geoffrey" wrote:
>
> > Jason.  I see your idea but I cant get that command to work right.   I
> > have been looking at awk, sed, gawk this whole day playing around with
> > it.  Still I don't know how your command worked and mine didn't.
> >
> > I will continue to play around with it...
> >
> > Thanks for the input
>
> I don't know why it wouldn't work for you...  I tested it with cygwin.
> Are
> you running this from the command line, or is it in some kind of script?
> I
> believe that if it is in a script the $1, $2 and $0 will get
> reinterpreted...
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev