Using awk to split a column into two columns

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.

You don't seem to print out anything, and your search pattern doesn't match the lines. Try

awk '/(Source|Destination): [x0-9]/ {ORS=NR%2?FS:RS} 1' file
        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

Hi.

An Alternative:

paste -s -d "\t\n" z1

producing:

        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

On a system like:

OS, ker|rel, machine: Linux, 3.16.0-7-amd64, x86_64
Distribution        : Debian 8.11 (jessie) 
paste (GNU coreutils) 8.23

Best wishes ... cheers, drl