younixgeek
IS-IT--Management
Hi Guys I need some help from the experts here. I need to convert an unformatted text report into any kind of CSV or field delimited file. I have been playing with this for hours and I keep hitting stumbling blocks. Can you all tell me how you would tackle this? All I have in my skill set to work with is a moderate level of SED, AWK, or KSH. I am not sure if I should do this all in SED, or an AWK array, or both. All of your suggestions and ideas much appreciated
here is a sample file with on record:
-----------------------------------------------------------------------
11/21/2005 DISTRIBUTOR Page:1
Client Listing
========================================================================
300W-3 300 W. CLIENT NAME Count: 1
Location #: 000 Phone #: (202)555-7414
Shipping Address: Billing Address:
300 W. ELM AVE. #110 300 W. ELM AVE. #110
PHOENIX AZ 85330-0000 PHOENIX AZ 85330-0000
Contact Name: JOHN SMITH Title:
Assigned To: 007
Customer Type: BR BOOTH RENTER
Secondary Customer Types
RRITORY 1 :
il Salon Services :
ova 10% Disc Cust :
ruples :
cleic A :
RRITORY :
TAX EXCEMPT CUST. :
COMAPNY INTEGRITY :
:
:
Year To Date: Number of Orders: 1 Purchase: 69.95
Start To Date: Number of Orders: 1 Purchase: 69.95
Current Balance: 0.00
Customer Since: 09/03/03
Last Order: 09/04/03
Last Payment: 09/15/03
Parent Customer ID: Alias:
Default Information
Delivery Code: VN4 Warehouse: 1
Salesman: 63
Discount Information
Price Level: 6 Matrix Code:
Term Code: 2 Discount Code: 0
Tax Information
Sales Tax Code: SCT Tax Exempt Number:
Credit Information
A/R Code: 1
Finance Charge Code: FC
Credit Limit: $ 0 Statement Type: 1
COD Credit Limit: $ 0 Credit Status: 1
COD Delinquent Over: 20 Days
Number of Returned Checks: 0 Last Returned Check:
-----------------------------------------------------------------------------
Thanks
-YG
here is a sample file with on record:
-----------------------------------------------------------------------
11/21/2005 DISTRIBUTOR Page:1
Client Listing
========================================================================
300W-3 300 W. CLIENT NAME Count: 1
Location #: 000 Phone #: (202)555-7414
Shipping Address: Billing Address:
300 W. ELM AVE. #110 300 W. ELM AVE. #110
PHOENIX AZ 85330-0000 PHOENIX AZ 85330-0000
Contact Name: JOHN SMITH Title:
Assigned To: 007
Customer Type: BR BOOTH RENTER
Secondary Customer Types
RRITORY 1 :
il Salon Services :
ova 10% Disc Cust :
ruples :
cleic A :
RRITORY :
TAX EXCEMPT CUST. :
COMAPNY INTEGRITY :
:
:
Year To Date: Number of Orders: 1 Purchase: 69.95
Start To Date: Number of Orders: 1 Purchase: 69.95
Current Balance: 0.00
Customer Since: 09/03/03
Last Order: 09/04/03
Last Payment: 09/15/03
Parent Customer ID: Alias:
Default Information
Delivery Code: VN4 Warehouse: 1
Salesman: 63
Discount Information
Price Level: 6 Matrix Code:
Term Code: 2 Discount Code: 0
Tax Information
Sales Tax Code: SCT Tax Exempt Number:
Credit Information
A/R Code: 1
Finance Charge Code: FC
Credit Limit: $ 0 Statement Type: 1
COD Credit Limit: $ 0 Credit Status: 1
COD Delinquent Over: 20 Days
Number of Returned Checks: 0 Last Returned Check:
-----------------------------------------------------------------------------
Thanks
-YG