I have a file which looks like this:
which I need to turn into this:
I've written a short Perl script to do the change but I got to thinking that this could probably be done much faster and easier with sed and/or awk. Problem is, I'm just learning these tools and am getting nowhere.
Would appreciate ideas on doing this without using Perl so that I can learn as I go.
Thanks!
Tom
"My mind is like a steel whatchamacallit ...
Code:
----------------------------------------------------------
| Last Name | First Name | MI | AcctNr | Status|
----------------------------------------------------------
| Duck | Daffy | D | 012345 | 2 |
----------------------------------------------------------
| Flintstone | Frederick | F | 223344 | 1 |
----------------------------------------------------------
(etc.)
which I need to turn into this:
Code:
Duck|Daffy|D|012345|2
Flintstone|Frederick|F|223344|1
(etc.)
I've written a short Perl script to do the change but I got to thinking that this could probably be done much faster and easier with sed and/or awk. Problem is, I'm just learning these tools and am getting nowhere.
Would appreciate ideas on doing this without using Perl so that I can learn as I go.
Thanks!
Tom
"My mind is like a steel whatchamacallit ...