Ok, so I tried to get this
0x0000: 4500 0044 68f7 4000 4011 25c7 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 1e8b 3132 3033 ...$.....0..1203
0x0020: 3132 2e37 3836 3036 2c20 332c 2020 2030 12.78606,.3,...0
0x0030: 2e31 3533 2c20 2d30 2e31 3533 2c20 2039 .153,.-0.153,..9
0x0040: 2e39 3630 .960
0x0000: 4500 0044 68f8 4000 4011 25c6 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 148f 3132 3033 ...$.....0..1203
0x0020: 3132 2e38 3336 3131 2c20 332c 2020 2d30 12.83611,.3,..-0
0x0030: 2e31 3533 2c20 2d30 2e34 3630 2c20 2039 .153,.-0.460,..9
0x0040: 2e39 3630 .960
0x0000: 4500 0044 68f9 4000 4011 25c5 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 1b80 3132 3033 ...$.....0..1203
0x0020: 3132 2e38 3836 3135 2c20 332c 2020 2d30 12.88615,.3,..-0
0x0030: 2e31 3533 2c20 2d30 2e33 3036 2c20 2039 .153,.-0.306,..9
0x0040: 2e38 3037 .807
0x0000: 4500 0044 68fa 4000 4011 25c4 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 2884 3132 3033 ...$.....0(.1203
0x0020: 3132 2e39 3336 3135 2c20 332c 2020 2030 12.93615,.3,...0
0x0030: 2e31 3533 2c20 2d30 2e31 3533 2c20 2039 .153,.-0.153,..9
0x0040: 2e38 3037 .807
to
E..Dh.@.@.%.....
...$.....0..1203
12.78606,.3,...0
.153,.-0.153,..9
.960
etc,
with this command
sed -u -e 's_0x0000: 4500 0044 68f7 4000 4011 25c7 8083 d0bf __g;s_0x0010: 8083 da24 85b1 15b3 0030 1e8b 3132 3033__g;s_0x0030: 2e31 3533 2c20 2d30 2e34 3630 2c20 2039__g;s_0x0020: 3132 2e37 3836 3036 2c20 332c 2020 2030__g;s_0x0040: 2e39 3630__g' <tcpdump_log_sample_capture2.txt >out2
and I got
E..Dh.@.@.%.....
...$.....0..1203
12.78606,.3,...0
0x0030: 2e31 3533 2c20 2d30 2e31 3533 2c20 2039 .153,.-0.153,..9
.960
0x0000: 4500 0044 68f8 4000 4011 25c6 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 148f 3132 3033 ...$.....0..1203
0x0020: 3132 2e38 3336 3131 2c20 332c 2020 2d30 12.83611,.3,..-0
.153,.-0.460,..9
.960
0x0000: 4500 0044 68f9 4000 4011 25c5 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 1b80 3132 3033 ...$.....0..1203
0x0020: 3132 2e38 3836 3135 2c20 332c 2020 2d30 12.88615,.3,..-0
0x0030: 2e31 3533 2c20 2d30 2e33 3036 2c20 2039 .153,.-0.306,..9
0x0040: 2e38 3037 .807
0x0000: 4500 0044 68fa 4000 4011 25c4 8083 d0bf E..Dh.@.@.%.....
0x0010: 8083 da24 85b1 15b3 0030 2884 3132 3033 ...$.....0(.1203
0x0020: 3132 2e39 3336 3135 2c20 332c 2020 2030 12.93615,.3,...0
0x0030: 2e31 3533 2c20 2d30 2e31 3533 2c20 2039 .153,.-0.153,..9
0x0040: 2e38 3037 .807
so, in the first 5 lines, it worked in every line but the fourth starting with 0x0030:
on the second set it worked for the last two lines BUT not for the first 3, and for the 3rd and 4th set, it worked for none!
can someone have a look and tell me what is going on? it is supposed to be recursive with the g option!
(I got sed (GNU sed) 4.2.2)
g
option relates to multiple instances in a single pattern space (line).sed 's/.* //'
?