home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
PMGREP.ZIP
/
PMGREP.DOC
next >
Wrap
Text File
|
1993-04-20
|
4KB
|
140 lines
=============================================================================
PMGREP File Text Search Utility
-------------------------------
by
David J. Pagliughi
=============================================================================
While searching various on line services, I noted that I couldn't find a GREP
port to the OS/2 Presentation Manager environment. While developing an Order
Processing system in OS/2 I found that I was opening a DOS session and
running a DOS based version of GREP (that came with the Borland Turbo
Assembler) several times each day. I decided to devlop a PM based GREP
program for my own use to avoid having to keep opening that DOS session and
trying to remember the command parameters. This PMGREP program is the result
of that programming effort. It is written in C and was compiled using the
IBM CSET/2 -- IBM WorkFrame environment.
=============================================================================
Program Operation:
1. Enter the search string. Quotes are not required. Wild Cards
are permitted (see Note 1).
2. Enter the starting search path and file mask.
3. Select the desired options.
4. Select Start. The status field displays the file names as they
are searched. When the search is complete,
### Search Complete ###
is displayed in the status field.
5. Optionally, double click on a file name or any text line
displayed for a file to edit the file with the OS/2 System
Editor (must be C:\OS2\E.EXE).
Options:
Case Sensitive:
If Case Sensitive is selected, the upper/lower case sense of
the search string must be matched exactly in the search file.
Absolute Search String:
If the Search String contains the characters * or ? and you
are searching for these characters (not using them as
wildcards - Note 1), you MUST select this option.
Search Subdirectories:
If this option is selected, files is lower subdirectories
with the same file mask will be seached also.
File Names Only:
The default output display is:
***** File: File Path\Name
Text line containing search string
...etc.
Selecting File Names Only will omit the display of the text
lines in the output display list box.
Display Line Numbers:
If selected, each line of text containing the search string
is prefixed by the line number within the file.
Other Options:
Clear:
The Clear button clears the Search String, File Specification
and the Search Results listbox. It does NOT reset the
Options.
Quit:
Close and Exit the application.
=============================================================================
Note 1. Search String Wild Cards.
The asterisk (*) and question mark can be used as wild card
characters. They retain the meanings normally assigned to DOS and
OS/2 directory operations.
Note 2. Source Code.
Much of the file specification parsing and search string find
portions of the program are based on the CSET/2 -- WorkFrame
GREP example provided by IBM.
Note 3. Planned Enhancements.
- Add On Line Help.
- Separate the file parsing and searching portions of the program
into a separate thread to allow:
-- Stop Search Button
-- Scrolling through the output listbox before the search is
complete.
-- Permit editing a file before the search is complete.
=============================================================================
PMGREP is freeware and as such you may freely distribute it as long as this
document file is included with the executable and no fee is charged. As
freeware, you take full responsibility for using the program and I am in no
way responsible for any damage or loss you may suffer either directly or
indirectly from using this program.
David J. Pagliughi
CPC International
Englewood Cliffs, NJ
April 19, 1993