Pergunta de entrevista da empresa Micro Focus

How to efficiently search through a text file on Unix-like systems? What command line command to use?