0

I have SQL output which is in that form when get from the DB server:

 1 OI 021 141012 1321 0001242 4S 2 0080004 5 001 00014 6 000001 000000000000016973 6 0529540437 0000000000
2963526113
test 7 8 000000001 9

Before that I use tr "\t" " " | tr -s " " to remove unwanted blank spaces and tabs. Now wondering how to move the second and third row (or if there another rows) into the first row.

Expectation view for me was that one:

1 OI 021 141012 1321 0001242 4S 2 0080004 5 001 00014 6 000001 000000000000016973 6 0529540437 0000000000 2963526113 test 7 8 000000001 9
mpapec
  • 50,217
  • 8
  • 67
  • 127
Kalin Borisov
  • 1,091
  • 1
  • 12
  • 23

1 Answers1

1

A simple awk script would be

$ awk '{all=all $0} END{print all}' test
 1 OI 021 141012 1321 0001242 4S 2 0080004 5 001 00014 6 000001 000000000000016973 6 0529540437 00000000002963526113test 7 8 000000001 9
nu11p01n73R
  • 26,397
  • 3
  • 39
  • 52