Hi guys, I'm looking to start scripting and have a problem I thought I would use to learn some basics, basically I have a list of my family's addresses that are in one big vertical list varying in size. I want to sort into a tabular format below is a example of the list
I'm looking into how to sort through a list, and print each element into a line under the right category heading (using comma's as a separator) then using a blank as a prompt for the script to move onto the next bunch of data in the list (in this case contact details) putting that on a new line
Thanks in advance
bob smith
43 canarvon road
worcester
WD2 4 XY
Tel:0800 000 000
Email:get@me.co.uk
john doe
56 victoria street
little hampton
hamtonshire
Email:the@there.com
lilly allen
94 Dames close
Simsville
Essex
Phone:0909811811
I would like to sort it as follows(csv format):
name, address1, address2, address3, address4, email, phone
bob smith, 43 canarvon road, worcester, WD2 4 XY, , Email:get@me.co.uk, Tel:0800 000 000
john doe, 56 victoria street, little hampton, hamtonshire, ,the@there.com, ,
lilly allen, 94 Dames close, Simsville, Essex,,, Phone:0909811811