sed for newline character replacement
Posted: Thu Jul 31, 2008 6:08 pm
Hi,
I have to change newline characters to space since one record has multiple lines from input file
like
-----------------------
1 2 3
4 5 6
3 5
-----------------------
2 4 6
6 7 8
7 7
-------------------------
In Sequential file stage I used sed 's/\n//g' which is not working
without knowing the meaning of N, sed 'N; s/\n//g' working partially.
Or use transformer stage to merge those lines? by the way all lines are delimited by newline character, no other delimiter defined for each record.
Please advice,
Thanks,
yxie
I have to change newline characters to space since one record has multiple lines from input file
like
-----------------------
1 2 3
4 5 6
3 5
-----------------------
2 4 6
6 7 8
7 7
-------------------------
In Sequential file stage I used sed 's/\n//g' which is not working
without knowing the meaning of N, sed 'N; s/\n//g' working partially.
Or use transformer stage to merge those lines? by the way all lines are delimited by newline character, no other delimiter defined for each record.
Please advice,
Thanks,
yxie