Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

SEARCH AmigaDOS
Purpose: Looks for the specified text string in the files of the specified directories.
Format: SEARCH [FROM] {<name | pattern>} [SEARCH] <string | pattern> [ALL] [NONUM] [QUIET] [QUICK] [FILE] [PATTERN] [CASE]
Template: FROM/M, SEARCH/A, ALL/S, NONUM/S, QUIET/S, QUICK/S, FILE/S, PATTERN/S, CASE/S
Path: C:SEARCH
SEARCH looks through all the files in the FROM directory for the string given in the SEARCH string. (The FROM and SEARCH keywords are optional.) If the ALL option is given, SEARCH also looks through all the subdirectories of the FROM directory. SEARCH displays the name of the file being searched and any line that contains the text sought. You must place quotation marks around any search text containing a space. The search is not case-sensitive unless the CASE option is used.

When the NONUM option is specified, line numbers are not printed with the strings.

When the QUIET option is specified, it searches quietly; file names being searched are not displayed.

When the QUICK option is specified, it uses a more compact output format.

When the FILE option is specified, it looks for a file by the specified name, rather than for a string in the file.

When the PATTERN option is specified, it uses pattern matching to search for the string.

SEARCH sets a 0 in the condition flag if the object is found, and a 5 (WARN) otherwise. To abandon the search of the current file and continue to the next file, if any, press Ctrl+D. SEARCH is aborted when Ctrl+C is pressed.

Example 1:

3.OS4:> SEARCH DEVS:DOSDrivers globvec
     DOSDrivers (dir)
        PRT.info..
        PRT..
     9 GlobVec   = -1
        PAR.info..
        PAR..
     9 GlobVec   = -1
        ahi.device..
        CDRW.info..
        CDRW..
    17 GlobVec         = -1
        TEXTCLIP.info..
        TEXTCLIP..
     5 GlobVec         = -1
        PIPE.info..
        PIPE..
     9 GlobVec          = -1
        AUX.info..
        AUX..
     8 GlobVec          = -1
        AUDIO.info..
        AUDIO..
     9 GlobVec         = -1

Example 2:

3.OS4:> SEARCH WBStartup info FILE
OS4:WBStartup/ContextMenus.info
OS4:WBStartup/DefIcons.info
OS4:WBStartup/ASyncWB.info
OS4:WBStartup/AmiDock.info


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.