-->
Previous Table of Contents Next


grep......Search Files

grep option(s) pattern file(s)

PURPOSE

The grep command searches a file or multiple files for text strings (referred to as patterns or expressions), and displaying the results of the search on the screen.

The grep command is a relative of the fgrep and egrep commands and is considered the most limited of the lot.

OPTIONS

-A num Displays num of lines after the matched pattern.
-b Returns the block number of the matched line.
-B num Displays num of lines before the matched pattern.
-c Returns the number of matches without listing the actual matches.
-C Displays two lines before and after the matched pattern.
-e pattern Searches for pattern when pattern begins with a hyphen (-).
-f file Uses a pattern from file.
-h Lists lines with matches without listing the files that contain them.
-i Ignores case when matching.
-l Lists files with matches without listing the actual matches.
-L Lists files that don’t contain matching lines.
-n Lists matched lines and their line numbers.
-s Suppresses error messages.
-v Lists lines that do not match the pattern.
-w Lists only whole words that are matched.
-x Lists only whole lines that are matched.
-num Displays num lines before and after the matched pattern.

EXAMPLE


$ grep “mail pixmap” *

This searches the current directory—as noted with *—for the string mail pixpap.

RELATED COMMANDS

egrep
fgrep

grodvi......Converts Groff to DVI

grodvi option(s) filename(s)

PURPOSE

The grodvi command converts groff output to the TeX DVI format.

OPTIONS

-d Does not use tpic specials to implement drawing commands.
-Fdir Searches the directory dir/devdvi for font and device description files.
-wn Sets the default line thickness to n thousandths of an em.

RELATED COMMANDS

eqn
groff
tfmtodit
troff

groff......Document Formatting

groff option(s) filename(s)

PURPOSE

The groff command is a front end to the groff document-formatting commands. It typically runs the troff program and a postprocessor to prepare documents for a specific device.

The postprocessor is specified by the postpro command in the device-description file.

DEVICES

ps PostScript printers and previewers (default)
dvi TeX DVI format
X75 X Window 75-dpi previewer
X100 X Window 100-dpi previewer
ascii Line printers with no formatting
latin1 Line printers with the ISO Latin-1 character set.

OPTIONS

-e Preprocesses with eqn.
-p Preprocesses with pic.
-R Preprocesses with refer.
-s Preprocess with soelim.
-t Preprocesses with tbl.
-V Prints a pipeline without executing it.
-z Suppresses output from troff; prints error messages.
-Z Overrides postprocessing output from troff.
-Parg Passes arg to the postprocessor.
-l Sends output to a printer.
-Larg Passes arg to the spooler.
-Tdev Prepares output for dev. The default is ps.
-X Previews with gxditview instead of using the usual postprocessor.
-N Doesn’t allow newlines with eqn delimiters.
-S Runs in safer mode.

RELATED COMMANDS

eqn
troff
tbl

grolj4......Groff for Laserjet 4

grolj4 option(s) filename(s)

PURPOSE

The grolj4 is a groff driver for the H-P Laserjet 4 family, producing output in PCL5 format.

OPTIONS

-cn Prints n copies of each page.
-Fdir Searches directory dir/devlj4 for font and device-description files.
-l Prints the document with a landscape orientation.
-p size Sets the paper size to size: letter, legal, executive, a4, com10, monarch, c5, b5, or dl.
-wn Sets the default line thickness to n thousandths of an em.

RELATED COMMANDS

eqn
groff
tfmtodit
troff


Previous Table of Contents Next