Hi friends,
I'm looking for a script to pull out the following information from a text file and write to a CSV file:
Product Name
Product NameShort
Product Number
Product Category
For an example from the text below would be:
firecare 14 zone labels,firecare 14 zone labels,MSC023173,PvC Label
Securitech 6 window keypad label, Securitech 6 window key,MSC023192,Keypad Label
If the product category or product number is empty in the source file, it can be written to the output file as an empty column. I.e.
Securitech 700 lid 2 colour,Securitech 700 lid 2 co,,
The link to the full text file is:
http://myweb.tiscali.co.uk/leegolding/work/file.txtThanks,
Lee.
--------------------------
----------
----------
----------
----------
----------
----------
----------
-------
± ú Challenger labels Mr J Newey Specials ( i i þ firecare 14 zone labels firecare 14 zone labelsMSC023173 Pvc Label ü i i þ Firetech 14 zone label Firetech 14 zone label MSC023120 Pvc Label ü i i
þ Tate TS1 lid Tate TS1 lid COM 1 Plastic Lid 5 i i þ
Tate TS2 lid Tate TS2 lid COM 2 Plastic Lid 5 i i þ Ademco A4 spanish Ademco A4 spanish COM 3 Plastic Lid 5 i i P1µ
þ Securitech Active 5 Securitech Active 5 COM 4 Plastic Lid % i i þ
Securitech active 5 lid COM 4 CPlastic Lid % m m þ Bravo 700 lid French Bravo 700 lid French COM 5 Plastic Lid m m þ Bravo 700 window label french Bravo 700 window label MSC023183 Plastic Lid Label ` m m ö CA67 window label CA67 window label MSC023157 ` m m ö Ademco 4 window label spanish Ademco 4 window label sMSC023168 ` m m M
± þ Bravo instructions french Bravo instructions frenMSC023189 Plastic Lid Instruct ` m m þ Active 5 window label Active 5 window label MSC023140 Plastic Lid Label < m m þ CA67 lid CA67 lid COM 6 Plastic Lid m m þ Ademco 5 lid Ademco 5 lid COM 7 Plastic Lid m m þ Active 5 lid Active 5 lid COM 8 Plastic Lid r m m þ Tate TBP 4Z lid Tate TBP 4Z lid COM 9 Plastic Lid Ì m m áx¸ ö Tate TBP 4Z window label Tate TBP 4Z window labeMSC023145 ` m m ö Securitech active 5 operating instruction MSC023193 < P m m þ Securitech 6 window keypad label Securitech 6 window keyMSC023192 Keypad Label m m þ Securitech 5 window keypad label Securitech 5 window keyMSC023187 Keypad Label à ® m m ö Securitech 700 lid 2 colour Securitech 700 lid 2 coCOM 10 â m m þ Securitech active 5 french Securitech active 5 freMSC023186 Plastic Lid l m m ¹ ö Countess italian Countess italian MSC023111 " m m þ Colin Lee posters Colin Lee posters HA 001 Window Posters m m ! þ Flashguard 139x250 label ASG 001 White On Clear m m " þ! ASG Midland label small ASG Midland label smallASG 002 White On Clear ´ m m # þ" R H bell label 3" x 7" R H bell label 3" x 7" ASG 003 Red On Clear h m m $ þ# Rover plates Rover plates MP 001 Metal Plates ö m m Ów¸ % þ$ Pathfinder lettering Pathfinder lettering PFM 001 Computer Cut L m m & þ% FPP14 english CEF label FPP14 english CEF labelLP1 3016 Pvc Label m m ' ö& 240v mains english label 240v mains english labeLM1 0240 m m ( þ' FPE english CEF label FPE english CEF label LP1 1003 Pvc Label P m m ) ö( Black signs , Ladies and/or Gents Black signs , Ladies anEE 001 " m m * ö) Black sign Ladies/Gents EE 001 E Ð m m .³¹ + ö* Clinical waste label black&red/yello Clinical waste label blWL 001 F n n , þ+ Triangle label 135x135x135 Triangle label 135x135xWL 002 Warning Label n n - þ, Leasecontract window label M2 001 Vinyl Label n n . ö- PAVA PV210 label PAVA PV210 label ML 001 $ n n / þ. Watmoughs label 20"x3" Watmoughs label 20"x3" SP 001 Vinyl Label Ì n n 0 þ/ Boxer label 50 kg ML 002 Vinyl Label Î n n C÷/¹ 1 þ0 Appollo plates Appollo plates CE 001 Metal Plates r n n 2 þ1 Karate label Karate label WL 003 Window Sticker ê n n 3 þ2 Gog Magog label Gog Magog label WL 004 Vinyl Label I n n 4 þ3 Sale sign Sale sign SAX 001 Poster Sign 7 n n 5 þ4 Durr label Durr label WL 005 Plastic Plates 0 n n 6 þ5 Davison label Davison label WL 006 Vinyl Label n n tº 7 ö6 Bell housing horizontal Bell housing horizontalHOR02 Ò n n 8 ö7 Bell housing vertical Bell housing vertical VERT01 ë n n 9 æ8 Postage&packing POST n n : ö9 labels labels MAG 01 ¦ n n ; æ: Positives Positives POS+ n n < ö; Printed alluminium plates Printed alluminium platSES 001 X n n ëg´ = þ< Maintenance stickers Maintenance stickers SES 002 Vinyl Stickers ô n n > þ= Speed control plates Speed control plates SES 003 Alluminium Plates ª n n ? þ> Reconditioned plates SES001 SAlluminium Plates X n n @ þ? Land Rover oval. Sheet 10. MAP 001 Stickers D n n A æ@ metal plates metal plates MP001 n n B þA Active 4 lid french Active 4 lid french COM 11 Plastic Lid n n ± C öJ Rascal label french Rascal label french MSC023151 l n n D þC Bio Rinz label MGS 001 Vinyl Label ° n n E öD Securitech active 5X french window label MSC023182 ` n n F öE Active 5X lid french COM 12 C Ì n n G öF Active 4 window label french MSC023184 ` n n H öG Tate 4 zone english Tate 4 zone english MSC023054 n n
± I öH Active 4 lid english Active 4 lid english COM 13 Ì n n J öI Active 4 window label english Active 4 window label eMSC023146 ` n n K öK Envoy 5 label Envoy 5 label MSC023194 l n n L þL Simplon label Simplon label ST 001 Roll Label < o o M þM Imobiliza label Imobiliza label CT 001 Vinyl Label R o o N öN Visi bell label Visi bell label LUS 001 ¨ o o ¸F¥º O þO Subaru label Subaru label JSP 001 Static Label o o P þP Seat numbers Seat numbers SLC 001 Vinyl ( o o Q þQ QVA label QVA label SLC 002 Vinyl Label o o R þR Marine pollutant label large Marine pollutant label DL 001 Vinyl Label Ö o o S þS 2 colour tanker haz chem DL 003 Vinyl Label L o o T þT Stop that leak label Stop that leak label DL 004 Styrene Label Ð o o XI¾ U æU cut job CUT o o V æV Styrene 1.5mm matt/matt Styrene 1.5mm matt/mattPLAS t t W öW Todays Hot Soup label Todays Hot Soup label VBO 001 ô X öX S00043 magnet label S00043 magnet label SF 001 & Y öY Summerhill fire notice A4 Summerhill fire notice AP 001 æ Z öZ Rusty chain label Rusty chain label AP 002 Ü
--------------------------
----------
----------
----------
----------
---------