Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 1999 23:36:04 -0700 (PDT)
From:      Johan Petersson <kjep@yahoo.com>
To:        freebsd-questions@freebsd.org
Cc:        alex@big-blue.net
Subject:   Re: Removing unwanted text
Message-ID:  <19991008063604.21385.rocketmail@web129.yahoomail.com>

next in thread | raw e-mail | index | archive | help
--0-1804289383-939364564=:21383
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I've attached a copy of the HTML file that will be 
filtered. Also I made a typo in the command line 
example, I meant to use lynx -source instead of -dump
to filter the HTML. I plan to extract the part from 
the line before where it says "METAR Sweden" to </PRE>
almost at the end. (In other words removing all the
junk at the top of the file...) The number of lines
vary so I can't use that.

--- Alex V P <alex@big-blue.net> wrote:
> Johan Petersson wrote:
> 
> > Hi everyone,
> >
> >    I am trying to create a filter that removes (or
> > filters out) part of a text. The idea would be
> > something like this:
> >
> > lynx -dump URL | (filter goes here) > textfile
> >
> > The part of the downloaded text that I want to
> keep
> > always begins and ends with the same phrases
> (though
> > the starting and ending phrases are not the same),
> > and I want to keep all the lines in between but
> not
> > those before and after. I've tried to work a bit
> with
> > grep and diff, but I couldn't get i working.
> >
> > Does anyone have any ideas how to do this?
> >
> > Best regards
> > Johan
> >
> > =====
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Bid and sell for free at http://auctions.yahoo.com
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body
> of the message
> 
> use perl ;-)
> can u send example of the file and what needs to
> stay? ;-)
> alex
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of
> the message
> 


=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
--0-1804289383-939364564=:21383
Content-Type: text/html; name="metar.html"
Content-Description: metar.html
Content-Disposition: inline; filename="metar.html"

<HTML>
<HEAD>
   <TITLE>MET</TITLE>
   <META NAME=Author CONTENT=roar>
   <META NAME=GENERATOR CONTENT=Mozilla/3.0b8Gold [Netscape]>
</HEAD>
<body bgcolor=#FFFFFF text=#000000 link=#000000 vlink=#000000 alin
k=#FF0000>
<BODY>
<table border="0" cellspacing="0" bgcolor="#0088FF">
<tr><td>
<p><font face="Arial"><font size="1"><b>The Swedish Civil Aviation
Administration aviation products are designed to be used by
pilots and persons in the aviation world.
</b></font></p>
<p><font size="2"><strong>DISCLAIMER:</strong></font><br>
<font size="1">
The information is distributed directly from the operational system at
 the Briefing Office and is identical to the one delivered from the 
Briefing Office, However, the information is supplied to the Internet 
by an administrative server therefore your attention is drawn to the 
fact that surveillance and reliability may not be equivalent to an 
operational server. 
In order to continuously secure information is delivered to the Internet echo TAFs and METARs are updated every five minutes. 
If any product is missing or if you suspect that the information has not 
been updated, please call the Briefing Office. 
If you any questions or opinions about the contents please, contact 
margareta.ryderstedt@ans.lfv.se </font></p>
</td></tr>
</table>
<table border="0" width="500" cellspacing="0" cellpadding="0">
  <tr>
   <td width="70"><strong><small><small><font face="Arial">METAR</font></small></small></strong></td>
    <td width="70"><strong><small><small><font face="Arial">TAF</font></small></small></strong></td>
    <td width="70"><strong><small><small><font face="Arial">TAF</font></small></small></strong></td>
    <td width="70"><strong><small><small><font face="Arial">LLF</font></small></small></strong></td>
    <td width="70"><a href="http://www.lfv.se/met/sigmet.txt.htm"><small><small><font
    face="Arial">SIGMET</font></small></small></a></td>
    <td width="90"><a href="http://www.lfv.se/met/winds.htm"><small><small><font face="Arial">Upperwinds</font></small></small></a></td>
    <td width="70"><a href="http://www.lfv.se/met/nswc.htm"><strong><small><small><font
    face="Arial">NSWC</font></small></small></strong></a></td>
  </tr>
  <tr>
    <td width="20%"><a href="http://www.lfv.se/cgi/met/metar.sweden"><small><small><font
    face="Arial">[Sweden]</font></small></small></a></td>
    <td width="20%"><a href="http://www.lfv.se/cgi/met/taffc.sweden"><small><small><font
    face="Arial">[Sweden]</font></small></small></a></td>
    <td width="20%"><a href="http://www.lfv.se/met/tafft.htm"><small><small><font face="Arial">[Europe
    18h]</font></small></small></a></td>
    <td width="20%"><a href="http://www.lfv.se/cgi/met/llf.esnn"><small><small><font
    face="Arial">[Sundsvall]</font></small></small></a></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
  </tr>
  <tr>
    <td width="20%"><a href="http://www.lfv.se/met/metar.nordic.htm"><small><small><font
    face="Arial">[Nordic]</font></small></small></a></td>
    <td width="20%"><a href="http://www.lfv.se/met/taffc.nordic.htm"><small><small><font
    face="Arial">[Nordic]</font></small></small></a></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><a href="http://www.lfv.se/cgi/met/llf.essa"><small><small><font
    face="Arial">[Stockholm]</font></small></small></a></td>
  </tr>
  <tr>
    <td width="20%"><a href="http://www.lfv.se/met/metar.europe.htm"><small><small><font
    face="Arial">[Europe]</font></small></small></a></td>
    <td width="20%"><a href="http://www.lfv.se/met/taffc.europe.htm"><small><small><font
    face="Arial">[Europe]</font></small></small></a></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><a href="http://www.lfv.se/cgi/met/llf.esms"><small><small><font
    face="Arial">[Malmö]</font></small></small></a></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
  </tr>
  <tr>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
    <td width="20%"><small><small><font face="Arial"></font></small></small></td>
  </tr>
</table>
<p><br>
<font size="5"><font face="arial"><strong>
METAR Sweden
</strong></font></font></p>
<PRE>
Last updated Fri Oct  8 06:25:03 UTC 1999
 
ESDA 080620 080620Z 25012KT 9000 -RA FEW007 SCT009 BKN011 12/11 Q1011=
ESDB 080550 080550Z 29016KT 9999 SCT010 BKN020 12/11 Q1011=
ESDF 080620 080620Z 20012KT 3500 RA BKN004 SCT016 11/11 Q1012=
ESGG 080620 24006KT 9999 FEW006 SCT025 10/10 Q1008=
ESGJ 080620 080620Z 19007KT 5000 -DZ BR OVC003 08/07 Q1009=
ESGT 080620 080620Z 19006KT 8000 BR BKN012 BKN040 10/09 Q1007=
ESGP 080550 080550Z 27011KT 9999 SCT046 SCT200 11/07 Q1009=
ESGR 080620 18007KT 9999 SCT010 BKN040 09/09 Q1008=
ESKN 080620 080620Z 21007KT CAVOK 07/05 Q1011=
ESMK 080550 080550Z 21006KT 7000 -RA SCT005 BKN010 11/11 Q1012=
ESMQ 080620 080620Z 19009KT 7000 -RA SCT016 BKN030 10/10 Q1013=
ESMS 080620 24013KT 3500 RA BR SCT005 BKN009 12/11 Q1012=
ESMT 080620 080620Z 28010KT 9999 FEW023 SCT120 12/10 Q1010=
ESMX 080550 17008KT 4000 -RA SCT003 BKN004 09/08 Q1010=
ESNG 080620 080620Z 32006KT 9999 BKN012 01/01 Q0998=
ESNK 080620 080620Z 33003KT 0200 R35/0125N BCFG SCT001 M02/M03 Q1006=
ESNN 080620 36002KT 0500N 7000S R16/0500 R34/1500 BCFG VCFG FEW002 
     SCT100 M02/M02 Q1006=
ESNO 080620 24006KT CAVOK 01/00 Q1004=
ESNQ 080550 36005KT 6000 SCT002 BKN007 00/M01 Q0998=
ESNS 080620 080620Z 26010KT 9999 -RADZ FEW020 BKN035 03/02 Q1000=
ESNU 080620 080620Z 23008KT CAVOK 02/00 Q1003=
ESOE 080620 19006KT 9999 SCT035 08/07 Q1008=
ESOK 080620 19011KT 9000 -RA FEW003 SCT007 BKN020 09/09 Q1006=
ESOW 080620 20010KT 9999 SCT012 BKN050 09/09 Q1009=
ESPA 080550 080550Z 29010KT 9999 BKN006 03/02 Q0998=
ESPC 080550 080550Z 16003KT 8000 BCFG SCT001 SCT100 00/00 Q1003=
ESSA 080620 20009KT 9999 -RA FEW008 SCT009 BKN050 09/07 Q1009 TEMPO 
     BKN009=
ESSB 080620 080620Z 22005KT 9999 SCT012 BKN070 09/08 Q1010=
ESSD 080620 080620Z 10003KT 6000 -DZ BR SCT006 BKN012 08/07 Q1006=
ESSK 080550 VRB01KT 2000 DZ BR OVC005 07/07 Q1007=
ESSL 080620 16005KT CAVOK 07/06 Q1010=
ESSP 080620 080620Z 17007KT 9999 SCT015 SCT030 07/06 Q1010=
ESSV 080620 20009KT 9999 SCT020 BKN090 10/08 Q1013=
</PRE>
</font>
</body>
</html>

--0-1804289383-939364564=:21383--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991008063604.21385.rocketmail>