|
Man :
It displays the UNIX manual pages on any specified command.
Syntax: $ MAN <any cmd>
Online manual displays all relevant information on UNIX
command and the option they support. The MAN files are not mere text
files. We cannot CAT a MAN file. Instead a MAN is a complex program that
searches and displays manual text from special files that contain
text-processing codes. Some MAN pages also reveal bugs in certain
commands. Each MAN page explains the use, syntax and switches available
with each command.
GREP :
Grep is one of the most useful UNIX filters. It scans a file for the
occurrence of a pattern, and can display the selected pattern, the line
numbers in which they are found, or the filenames where the pattern
occurs. Grep can also select lines containing the pattern.
Syntax : $ grep options patterns filename(s)
E.g. $ grep president emp.lst
OPTIONS :
-c (continuous occurrence) : the –c (count) options counts the
occurrences.
-n (displaying line numbers : the –n (number) option can be used to
display the line numbers containing the pattern, along the lines.
-v (deleting lines) : the –v (inverse) option selects all but the lines
containing the pattern.
REGULAR EXPRESSIONS :
Regular expressions take care of some common query requirements. You may
not be aware of the spelling of a name, but you may want the system to
present a file of possible ones, so that you can select exactly the one
you require. If any expression uses any of these characters, it is
termed a regular expression. |