I need some assistance with automating a process (e.g., developing a script) which allows to "clean up" a text file.
Please see attached a *sample* text file. Please note that the actual text file contains completely different data but follows the same structure.
Things that are noteworthy in the text file:
1. Each block consists of six (6) lines.
2. Within each block, the end-of-line (EOL) is marked by a slash ( "\").
3. In some instances, there are 2 blank lines between a block... in other case, there may be only a single blank line between blocks.
In the "before cleanup script", the sample text file contains four (4) blocks. After the cleanup, the file *should* look like the 2nd part... that is, 4 lines without any "text wrapping".
My question: How can the cleanup process be automated so that I end up with only four lines (as illustrated in the file)?