Files
oldlinux-files/Minix/1.7.5/MANUALS/CAT0/FGREP
2024-02-19 00:21:39 -05:00

66 lines
1001 B
Plaintext

Command: fgrep - fixed grep
Syntax: fgrep [-cfhlnsv] [string_file] [string] [file] ...
Flags: -c Count matching lines and only print count, not the lines
-f Take strings from file named in following argument
-h Omit file headers from printout
-l List file names once only
-n Each line is preceded by its line number
-s Status only, no output
-v Print only lines not matching
Examples: fgrep % prog.c # Print lines containing % sign
fgrep -f pattern prog.c # Take strings from pattern
Fgrep is essentially the same as grep, except that it only searches
for lines containing literal strings (no wildcard characters). The
pattern may consist of several lines with one string to search on each
line.