Joining two consecutive lines using awk or sed
awk '!(NR%2){print$0p}{p=$0}' infile
You can use printf with a ternary:
awk '{printf (NR%2==0) ? $0 "\n" : $0}'
awk '!(NR%2){print$0p}{p=$0}' infile
You can use printf with a ternary:
awk '{printf (NR%2==0) ? $0 "\n" : $0}'