[buug] data manipulation problem - UNIX sed/awk/perl solution???

Gorden-Ozgul, Patricia E gorden at bnl.gov
Wed Aug 7 10:57:21 PDT 2002


I'm a 'database' person who enters the wonderful word of UNIX only
occasionally.
It usually provides a solution to any problem if one knows how to use it.

I'm in the process of converting data from one system to another.
I have a datafile that requires manipulation.
When observing the data in vi, while in :set list mode, each line ends with
'$'

My problem?
The source system truncated some lines of data, placing the '$' prematurely
to and began a new line.  For example:

...
...
<#NAME = PUBLISHER>Random House</#NAME>
<#NAME = AUTHOR>Smith, James; Smith, Peter; Smith, Johanna; Smith, Roberta;
Smith, Robert; Smith, Douglas; Smith, Katherine; Smith, Denis; Smith,
Mustafa$
Smith, Karen; Smith, Alexander; Smith, Alexandra$
<#NAME = TITLE>This is the Title</#NAME>$
...
...

What do I want?

...
...
<#NAME = PUBLISHER>Random House</#NAME>
<#NAME = AUTHOR>Smith, James; Smith, Peter; Smith, Johanna; Smith, Roberta;
Smith, Robert; Smith, Douglas; Smith, Katherine; Smith, Denis; Smith,
Mustafa; Smith, Karen; Smith, Alexander; Smith, Alexandra$
<#NAME = TITLE>This is the Title</#NAME>$
...
...

Would anyone out there have code that would perform this task?

Please respond to gorden at bnl.gov.

Pat Gorden-Ozgul



More information about the buug mailing list