I have a data like below:
abcd
join abcd
efgh
join efgh
I want to join the two consecutive pair into one line. Resulting:
abcd join abcd
efgh join efgh
How can I do it in Perl/AWK?
$ sed 'N;s/\n/ /' input.txt
abcd join abcd
efgh join efgh
The simplest way is:
paste - - < FILE
This joins using a space instead of a tab:
paste -d" " - - < FILE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With