[REBOL] Re: Printing several lines
From: ryanc::iesco-dms::com at: 13-Jul-2001 14:06
try it like this
foreach customer customers [
if find customer name [ print-lines: 4]
if print-lines > 0 [
print customer
print-lines: print-lines - 1
]
]
rick falls wrote:
> Hello,
> Could someone tell me how to print several lines once a search word has been
> found in a text file.I am searching a text file of saved e-mails and would
> like to print the line containning the search word and the next 3 or 4 lines
> of info.
> Thanks Rick
>
> ************What I have so far*************************************
> REBOL[
> Title: "Database search"
> Date: 13-July-2001
> Version: 1.0.0
> Purpose: "E-mail database search"
> ]
>
> prin "Enter search word............."
> name: input
> customers: read/lines %test3.xml
> foreach customer customers [if find customer name [ print customer]]
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400