[Courses] How to get line-information from buffer..

Conor Daly c.daly at met.ie
Tue Oct 1 08:59:21 EST 2002


On Mon, Sep 30, 2002 at 10:42:45PM -0700 or thereabouts, Abel Pires da Silva wrote:
> You need to do something like:
> 
> for each line in *buffer {
  fgets(buffer,<size>,cliline);
  if ((strstr(cliline,"Host:")) != NULL ) {
>   for each line in *file {
>     if ((strstr(cliline,file)) != NULL ) {
>       Do stuff for line match
>     }
>   }
> }
}
> 
> Thank you Conor for pointing the problem...
> But I think with some example of the above, will make
> it clear...

You almost have it...

Conor
-- 
Conor Daly 
Met Eireann, Glasnevin Hill, Dublin 9, Ireland
Ph +353 1 8064276 Fax +353 1 8064247
------------------------------------
bofh.irmet.ie running RedHat Linux  8:56am  up 3 days, 16:07,  6 users,  load average: 0.15, 0.08, 0.08


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept 
for the presence of computer viruses.


**********************************************************************




More information about the Courses mailing list