Question: can I use `sed` or `awk` to append to the previous line if a match is found ?

I have a file which has the format :

```
          INT32
          FSHL (const TP  Buffer)
             {
          INT32
          FSHL_lm (const TP  Buffer) 
          { WORD32 ugo = 0; ...

```

What I am trying to do is scan for independant open braces `{`and append it to the previous non-blank line .The match should not occur for an open brace appended by anything in the same line .

The expected output :

```
           INT32
          FSHL (const TP  Buffer){
          INT32
          FSHL_lm (const TP  Buffer) 
          { WORD32 ugo = 0; ...

```

Thanks for the replies .

Answer: 
One way using `awk`:

```
awk '!(NF == 1 && $1 == "{") { if (line) print line; line = $0; next; } { sub(/^[ \t]+/, "", $0); line = line $0; } END { print line }' file.txt

```

Or broken out on multiple lines:

```
!(NF == 1 && $1 == "{") { 
    if (line) print line
    line = $0
    next
}

{
    sub(/^[ \t]+/, "", $0)
    line = line $0
}

END {
    print line
}

```

Results:

```
INT32
          FSHL (const TP  Buffer){
          INT32
          FSHL_lm (const TP  Buffer) 
          { WORD32 ugo = 0; ...

```

HTH
[shyam@localhost ~]$ perl -lne 's/^/\n/ if $.>1 && /^\d+/; printf "%s",$\_' appendDateText.txt

that will work

i/p:

06/12/2016 20:30 Test Test Test

TestTest

06/12/2019 20:30 abbs abcbcb abcbc

06/11/2016 20:30 test test

i123312331233123312331233123312331233123312331233Test

06/12/2016 20:30 abc

o/p:

06/12/2016 20:30 Test Test TestTestTest

06/12/2019 20:30 abbs abcbcb abcbc

06/11/2016 20:30 test ##testi123312331233123312331233123312331233123312331233Test