If I understand your needs, grep without any options should do the work. If you grep the file with the word you are looking for, the output will be all the lines containing that word:
%grep your_word file_name
If you only use the first line, then you have the first line containing the desired word:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.