On May 7, 2022, at 1:24 PM, Constantine Vassilev <thst...@gmail.com> wrote: > > I need to write a program that reads STDIN and should output every line that > contains a search word "test" to STDOUT. > > How I can test that considering the problem is a line can be 100s of MB long > (\n is line end) and tens of MB info is passed to it.
What do you mean by "tens of MB info"? Do you mean the search string can be tens of MB long or something else? Is the search string really "test" or can it be anything? Can it be a regular expression? Describing a problem clearly and accurately is half the battle. Anyway, think about what you would have to do if lines were so long they *didn't* fit in memory! [Alternatively think what you would have to do on a PDP11!] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4182031A-F9D6-4D10-9709-78FA4DFCE4CE%40iitbombay.org.