home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
262.lha
/
ArpDoc_v1.3
/
Search
< prev
next >
Wrap
Text File
|
1989-07-01
|
4KB
|
133 lines
Search(V1.3) ARP User's Manual Search(V1.3)
NAME
Search - Search a file or files for a name or pattern.
SYNOPSIS
Search From/a Search ALL/s NONUM/s QUIET/s QUICK/s FILE/s
CASE/s
DESCRIPTION
Use Search to hunt for patterns or strings in files. As
usual, you can specify the files using a wildcard pattern,
and you can also specify a directory to be searched. Search
also allows itself to be used in the middle of a pipeline.
To do this, you must use the filename STDIN, and it must be
spelled in UPPER CASE.
The ARP Search also allows you to specify a wildcard pattern
as the search string, which the BCPL version still does not.
Any valid ARP pattern may be used as the search string.
If a search object is found, then Search will return 0,
otherwise it will return with the WARN faillevel set. This
makes Search usable in scripts (see also QUIET, below).
When searching through more than one file at a time, you can
use C-e or C-f (Control E or Control F) to abandon the
current file and move on to the next. (NOTE: This is
different from the Commodore BCPL search, which uses C-d
(Control d). Using C-e and C-f prevents conflicts with
using C-d in script files, since C-d will abort a script
file.) As usual, to kill the program, use C-c (Control C).
ARP's Search places the last pattern you used in an
environment variable called "Search". If you reuse Search
at a later time, and omit the search string, Search will use
the value of this Environment variable. This is convenient
when searching for complex patterns over and over again on
different disks or directories. This is also available to
other programs to use if desired.
OPTIONS
ALL Recursively descend all directories in the specified
branch of the directory tree, searching each file for
the pattern specified.
NONUM
Do not display line numbers. This option will also
kill the indent Search usually adds to the lines it
displays.
Page 1 (printed 4/28/89)
Search(V1.3) ARP User's Manual Search(V1.3)
QUIET
Search without displaying found lines. This is useful
when you only want to get the return code from Search
(for example, in a script file).
QUICK
This causes Search to use a more compact output format
to speed up display. NOTE - when using SEARCH from
an interactive CLI, this is the DEFAULT.
FILE This causes Search to hunt for a file of the specified
name, rather than searching through the contents
of the files.
CASE This causes Search to consider case as important in
comparing search patterns. Ordinarily, case is ignored
during a search.
EXAMPLES
Search SYS:INCLUDE/exec/*.h SIG?_*
The command line above demonstrates the use of wildcard
patterns in both the FROM and the SEARCH string positions.
This will cause Search to look at all files in
SYS:INCLUDE/exec which end with the characters '*.h', for
all strings which begin with the three characters 'SIG',
followed by any character, followed by an underscore,
followed by anything.
Page 2 (printed 4/28/89)