Hello,
I'm trying to append a line to previous if it doesn't begin with a equal sign
Input
...
=POUILLY SUR VINGEANNE
=2006
0628
59.9370-111
25.619
=45370
...
Expected Output:
...
=POUILLY SUR VINGEANNE
=2006|0628|59.9370-111|25.619
=45370
What I've tried so far:
concatenation works but unfortunately I get a vertical bar on every line (
Can you please point my error ?!
Thank's in advance.
I'm trying to append a line to previous if it doesn't begin with a equal sign
Input
...
=POUILLY SUR VINGEANNE
=2006
0628
59.9370-111
25.619
=45370
...
Expected Output:
...
=POUILLY SUR VINGEANNE
=2006|0628|59.9370-111|25.619
=45370
What I've tried so far:
Code:
awk '/^=/ {if (line) print line; line=""}{line = line $0"|"} END {if (line); print line }'
concatenation works but unfortunately I get a vertical bar on every line (
Can you please point my error ?!
Thank's in advance.