in reply to Print only the matched line when process line by line from a file

It is impossible to know that a fruit is not in the file until you have read the entire file. NetWallah has proposed a program that saves (but does not print) the required data as you read the file. After all the data is collected, you can decide what to print.
Bill
  • Comment on Re: Print only the matched line when process line by line from a file