From owner-freebsd-questions Wed May 22 04:21:05 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA19779 for questions-outgoing; Wed, 22 May 1996 04:21:05 -0700 (PDT) Received: from hq.hq.af.mil (hq.hq.af.mil [134.205.123.148]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id EAA19769 for ; Wed, 22 May 1996 04:21:02 -0700 (PDT) Received: from pubspo.hq.af.mil (pubspo.hq.af.mil [134.205.165.49]) by hq.hq.af.mil (8.7.5/8.7.3) with SMTP id HAA25831 for ; Wed, 22 May 1996 07:24:02 -0400 (EDT) Received: by pubspo.hq.af.mil with Microsoft Mail id <31A323B6@pubspo.hq.af.mil>; Wed, 22 May 96 07:24:54 PDT From: "Gregory, Scott D. SRA SAF/AADO" To: questions Subject: Help With Scripts Date: Wed, 22 May 96 07:19:00 PDT Message-ID: <31A323B6@pubspo.hq.af.mil> Encoding: 82 TEXT X-Mailer: Microsoft Mail V3.0 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I'm trying to write a script to create HTML pages from a text file (output from a database). I'm new to FreeBSD (2.1) and UNIX and I can't find the appropriate books at the library. My text file is delimited by '@' and has 7 fields (see below). I would like to convert this into a HTML table. An example of how I would like my output is below. The example shows what fields I would like and where they should be placed. I would like to separate the pages by the 100 (00-99 (saved to filename af0000-0099.html, af0100-0199.html, etc.) (field 1--AF000, AF001, AF002, etc.), however, the directory location of the file is by the 1000 (which is why I need to extract characters 1,2 and 4 from the 1st field. I'm not currently subscribed to questions, so please email me directly at sgregory@pubspo.hq.af.mil or sgregory@ameritel.net. Thanks in advance for your assistance. C-ya Scott SAMPLE TEXT FILE: AF00003@OC86@af0003.frl@Hazard@1@9130@AF1-301 AF00008@MA85@af0008.frl@Certificate@3@1100@A1-401 AF00049@AP95@af0049.frl@Application@1@3620@A36-2619 AF00053@FB88@af0053.frl@Blotter@1@3120@AF1-201 AF00078@JA91@af0078.frl@Recommendation@1@3600@A36-9 AF00081@MA81@af0081.frl@Description@1@3810@A38-201 AF00108@JA91@af0108.frl@Processing@2@4000@A40502 AF00115A@AU52@af0115a.frl@Numbers@1@2300@AM6-1 AF00116@SE80@af0116.frl@Criteria@1@3110@A31-101V1 AF00126@OC69@af0126.frl@Log@1@1020@A10-215 AF00130@DE95@af0130.frl@Symbol@1@3740@AI7-124 AF00143@SE82@af0143.frl@Page@1@3120@AF1-401 AF00191@JL95@af0191.frl@Request@1@2320@AFM-1V1 AF00230@NO82@af0230.frl@Transfer@1@4120@AF1-210 AF00233@FB96@af0233.frl@Contract@1@3620@AF6-2107 AF00235D@NO86@af0235d.frl@Supplement@2@4000@AFM8-695V1 AF00242@JN90@af0242.frl@Staff@1@5100@AFR11-1 AF00259@AU95@af0259.frl@Worksheet@1@3620@AF36--3212 AF00304@JN95@af0304.frl@Counsel@1@5110@AF51-201 AF00310@NO95@af0310.frl@Document@1@3120@AF31-401 AF00321@AU71@af0321.frl@Record@2@3150@AF1-202 AF00332@JA91@af0332p1.frl@Work Request@1@3600@AFR30-20 AF00340@MA95@af0340.frl@Data@1@3110@AF31-101V1 SAMPLE OUTPUT: Electronic Foo

Electronic Foo

...............etc., etc.
Short Title Date Title and Version Code Publication
'field 1' 'field 2' 'field 4', Ver 'field 5' 'field 6' 'field 7'