Name
fgrep
Synopsis
fgrep [options] pattern [files]
Description
Search one or more files for lines that match a literal text string pattern. Exit status is 0 if any lines match, 1 if not, and 2 for errors.
See grep for the list of available options. Also see egrep.
Examples
Print lines in file that don’t contain any spaces:
fgrep -v ''
file
Print lines in file that contain the words in spell_list:
fgrep -f spell_list
file
Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.