Hi,
I am trying to split the following output into two columns, where each column has Source: Destination:
OUTPUT TO FILTER
$ tshark -r Capture_without_mtr.pcap -V | awk '/ (Source|Destination): [0-9]/' | more
Source: x.x.x.x
Destination: x.x.x.x
Source: x.x.x.x
Destination: x.x.x.x
Source: x.x.x.x
Destination: x.x.x.x
I am attempting to use the below condition ORS=NR%2?FS:RS (If NR%2, then TRUE condition - FS - default space, else FALSE condition - RS - default \n) however it does not work.
$ tshark -r Capture_without_mtr.pcap -V | awk '/ (Source|Destination): [0-9]/ {ORS=NR%2?FS:RS}'
$
DESIRED OUTPUT
$ tshark -r Capture_without_mtr.pcap -V | awk '/ (Source|Destination): [0-9]/' | paste - - | sort | uniq
Source:x.x.x.x Destination: x.x.x.x
Source: x.x.x.x Destination: x.x.x.x
Source: x.x.x.x Destination: x.x.x.x
Can I please get some guidance around what is incorrect?
Thanks.