On 4/17/06, Jon Drews <[EMAIL PROTECTED]> wrote:

> > Given a file, similar to
> >
> > <html>
> > <head>
> > stuff
> > </head>
> > <body>
> > <pre>
> > content of interest
> > </pre>
> > </body>
> > </html>
> >
>
> Here is what I got for a script, using Awk.
>
> Save this as StripPreBlock.awk:
>
> BEGIN {  FS="\n"
>         RS="<"
> }
> {
>         if ($1 ~ /pre>/ && $1 !~ /\/pre>/)
>         {
>                 print "<pre>"
>                 for (j=2; j <= NF; j++)
>                         print $j
>                 print "</pre>"
>         }
> }
>
>

 Oops  - this does not work if in between the <pre> </pre> tags I have
something like <href> content </href> or <h1></h1>



--
Kind regards,
Jonathan
 
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/

Reply via email to