I need to concatenate all lines of a file into 1 line.
input file containing lines like
001123456400001234563 107 001578000000000000000000000000000000000000 0000000021600
001123456912345600003 107 001578000000000000000000000000000000000000 0000000992000
i am using command
echo `awk '{ printf ("%s",$0) }' infile`> outfile
its working fine but converting number of spaces to 1 like if file having 12 spaces its counting 1. I want record length should not altered while concatnating the lines. Kindly help.
Output file should be in one line with same number of spaces as in input file like:
001123456400001234563 107 001578000000000000000000000000000000000000 0000000021600 001123456912345600003 107 001578000000000000000000000000000000000000 0000000992000
Here also i am not able to display correct number of spaces(displaying only 1 space)