![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
GrepThe Grep command searches one or more files for the occurrence of a text string. It is invoked from the ToolsSearch menu. Grep displays the Grep dialog box.
Grep Dialog Box Fields:
Pattern Field
Input the text string to match for in the Pattern field.
Objects to search for the pattern
The objects to be searched may be specified as files or versions using radio buttons:
- Objects
A list of pathnames designating files to be searched must be specified. Directories and individual files may be searched.
- Versions
A list of versions to be searched is provided. Full version names must be specified (see Version and Element Names). A version number may be "*" to search all versions of the element in the given history.
Grep Check Boxes
- Ignore Case
Search ignores upper-case/lower-case differences . Similar to grep -i.
- Treat Pattern as Regular Expression
Search pattern is a regular expression. See the grep man page.
- Also Search Objects with "Execute" Permission
Search includes files that have Execute permission set. See the chmod man page.
- Exclude files matching
Specifies filename patterns for files to excluded from the search. If a file matches any of these patterns it is excluded. (Does not apply when using full version names.)
- Only include files matching
Specifies filename patterns for included files. A file must match at least one of these patterns to be included. The default pattern is "*". The exclusion patterns apply to matching files. (Does not apply when using full version names.)
Search Results
If Grep finds one or more files that have text strings matching the pattern, it displays their names in a Find window. To open a file, use one of these techniques:
- Double-click on a file name in the Find window.
- In the Find window, select one or more filenames and then use Navigate > Visit from the menu bar. An editor window is opened for each file selected.
Each editor window opens to the first occurrence of the matched pattern in the file.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |