forsyth20121205-174063a80cc13 years agoHistory
51 lines · 971 B · Text
RawDownload
.TH GREP 1.SH NAMEgrep \- pattern matching.SH SYNOPSIS.B grep[.B -lnviLs] .I pattern[.IR file ...].SH DESCRIPTION.B Grepprints lines from each.I filethat match the.IR pattern ,a regular expression as defined in.IR regex (2).If no files are given, standard input is used.If more than one file is given, each line of outputis preceded by the name of the file it was found in.The options are:.TP 10.B -lPrint only the name of each file that contains a match..TP.B -LPrint the name of each file that does not contain a match..TP.B -nPrecede each line of output with its line number..TP.B -vPrint only lines that do not match.IR pattern ..TP.B -iPattern matching is case insensitive (roman letters only)..TP.B -sDo not print anything; yield only the exit status..SH SOURCE.B /appl/cmd/grep.b.SH SEE ALSO.IR regex (2).SH DIAGNOSTICS.I Grepreturns a non-nil exit status if no matches have been made,or if an error has occurred.