I guess you could pipe the output through
sed using a variation on a well-known
sed one-liner to double-space a file or stream:
Code:
tcpdump -r your-file.pcap | sed 'G' | less
That works if you want all the lines double-spaced regardless of which packet they are in then G alone would do it.
The G alone would append the hold space to the pattern space, double-spacing the stream.
sed is a very simple and dreadfully concise programming language.
So, if you want to group the packets, then you have to identify the start of the packet with a pattern // and then apply G to it only if the pattern is not present:
Code:
tcpdump -r your-file.pcap | sed '/^..:..:..\./!G' | less
However, packets are two lines so we want to skip that and do the append with every other line. If you're using the default time format for
tcpdump then you have colons as the 3rd and 6th character with a period as the 9th character in the lines starting each packet to identify those lines and so the append is skipped for those lines.
Edit: maybe a better, more generic way would be to insert a line ahead of each packet:
Code:
tcpdump -r your-file.pcap | sed '/^..:..:..\./{x;p;x}' | less