- 论坛徽章:
- 0
|
Could anyone tell me the basic idea for dealing this question?
The question is reformat a text into an XML-styled format.
Once upon a midnight <TAB> dreary, while I pondered weak and weary,
Over many a quaint and curious volume of<Tab>forgotten lore,
become:
<row>
<entry>Once upon a midnight</entry>
<entry>dreary, while I pondered weak and weary,</entry>
</row>
<row>
<entry>Over many a quaint and curious volume of<entry</entry>
<entry>forgotten lore, </entry>
<row>
I am consider by reading per character, tab separated and line feed should be the case.
How can I detect it is a tab separated and it is going to create a new line in awk ?
note: <TAB> is tab separated. this forums ignore tap.![]() ![]() |
|