-->
Previous Table of Contents Next


emacs......Text Editor


emacs option(s) filename(s)

PURPOSE

The emacs command launches a text editor. Most Linux distributions install emacs to work under the X Window System, but it can be installed and configured to work under a terminal interface.

The full documentation to emacs can be found online using the info command.

OPTIONS

+number Opens the file on line number.
-font font Specifies a fixed-width font for the window. (Used with X.)
-i Uses the kitchen sink bitmap icon when iconifying the emacs window. (Used with X.)
-name name Specifies a name for the initial X window.
-nw Works with terminal interface under X.
-q Doesn’t load an init file.
-r Displays in reverse video. (Used with X.)
-t file Uses file as the terminal instead of standard input/output.
-title title Specifies a title for the initial X window.
-u user Loads user’s init file.

RELATED COMMANDS

elvis
vi

expand......Expand Tabs

expand option(s) file(s)

PURPOSE

The expand command converts tabs to spaces.

OPTION

-i Converts only tabs at the beginning of lines.

fgrep......Fast Grep

fgrep option(s) pattern file(s)

PURPOSE

The fgrep command searches files for text (referred to as patterns or expressions) in multiple files or a single file. It is a cousin to the egrep and grep commands and usually is considered the simplest of the three. It returns a 0 if any lines match, 1 if no lines match, and 2 if it encounters an error.

OPTIONS

-A num Displays num of lines after the matched pattern.
-B num Displays num of lines before the matched pattern.
-b Returns the block number of the matched line.
-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.
-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.

RELATED COMMANDS

egrep
grep

fmt......Format File

fmt option(s) files

PURPOSE

The fmt command formats files by justifying the text to the right margin and eliminating newlines. However, the fmt command does preserve spacing, indentations, and blank lines from the original file.

Since this function is not performed by text editors, it’s usually invoked within the text editor (elvis has a mechanism for doing this) or piped from a text editor. In addition, because it’s often used to format a file and then sent directly to a printer, it usually exists as one step in a pipeline.

OPTIONS

-c Overrides formatting of the first two lines.
-p prefix Formats lines beginning with prefix.
-s Overrides joining lines.
-t Tags paragraphs.
-u Applies uniform spacing of only one space between words and two spaces between sentences.
-w num Sets the line width to num characters; the default is 72.

fold......Format Page

fold option(s) file(s)

PURPOSE

The fold command formats text to a specific width, breaking words in the middle to achieve that width. The default is 80 characters.

OPTIONS

-b Counts bytes instead of characters. Here, tabs and formatting commands (like backspace commands and carriage returns) are considered countable.
-s Breaks only on spaces.
-w num Sets the line width to num characters; the default is 80.

ghostview......View PostScript File

ghostview option(s) filename

PURPOSE

The ghostview command displays PostScript files, using the ghostscript interpreter. A large number of options are associated with this command, but generally it is just invoked with a filename. (See the online-manual pages for more information on the many options.)


Previous Table of Contents Next