Difference between revisions of "Shell Commands/Search"
From MorphOS Library
(Created page with "'''Search''' - Searches a file or pattern for a string FROM/M, SEARCH/A, ALL/S, NONUM/S, QUIET/S, QUICK/S, FILE/S, PATTERN/S, CASE/S...") |
|||
Line 17: | Line 17: | ||
Examples: | Examples: | ||
− | <nowiki> | + | <nowiki> |
MorphOS:> search c:help $VER | MorphOS:> search c:help $VER | ||
1083 VER: Help [MOS] 0.6 (19.12.2004)© 2004 by Nicolas Ramz | 1083 VER: Help [MOS] 0.6 (19.12.2004)© 2004 by Nicolas Ramz |
Revision as of 13:07, 3 March 2015
Search - Searches a file or pattern for a string
FROM/M, SEARCH/A, ALL/S, NONUM/S, QUIET/S, QUICK/S, FILE/S, PATTERN/S, CASE/S
FROM - Directory where to search SEARCH - Search string ALL - if FROM is a Dir, will process subdirectories as well NONUM - Do not print the line numbers with the string QUIET - Searches quietly; file names being searched are not displayed QUICK - Use a more compact output format FILE - Looks for a file by the specified name, rather than for a string in the file PATTERN - Only files matching this pattern will be processed CASE - Search is case-sensitive (default=NO)
NOTE: Search leaves 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.
Examples:
MorphOS:> search c:help $VER 1083 VER: Help [MOS] 0.6 (19.12.2004)© 2004 by Nicolas Ramz MorphOS> search utilities #?.info file MorphOS:Utilities/Calculator.info MorphOS:Utilities/Snoopium.info MorphOS:Utilities/TaskManager.info