the input file I have generated from a xml file. Means in the beginning of line sometimes there is a space or tab.
the content is:
SURNAME= Mueller
ADDRESS= Schulstreet 14
POSTCODE= 86348
PHONE= +44 998763
SURNAME= Schmidt
ADDRESS= Westroad 20
POSTCODE= 45694
INFO= sometimes the infoline has a big content so that
the line itselfe is visible in more line.
SURNAME=Schuster
ADDRESS= Usestreet 80
PHONE= +44 8963447
awk '/SURNAME/ {$0="\n"$0} END {print "\n"} 1' ORS=" " file
SURNAME= Mueller ADDRESS= Schulstreet 14 POSTCODE= 86348 PHONE= +44 998763
SURNAME= Schmidt ADDRESS= Westroad 20 POSTCODE= 45694 INFO= sometimes the infoline has a big content so that the line itselfe is visible in more line.
SURNAME=Schuster ADDRESS= Usestreet 80 PHONE= +44 8963447