Version 1.42

About
Features
Download
Installation
Architecture
FAQ
The Importance
of Impatience
Credits

SourceForge.net Logo
The Squealer
Grep
 

The Squealer brings the features of a Unix grep to your environment, with some additional goodies. One is use of Perl regular expressions; another is option to display the results with a context "window" (default for -window is 1), for example 2 lines either side of the match.

You can grep (-grep) the current file (for example to highlight log file patterns) or grep any combination of files using the normal Squealer file and directory patterns. If you don't specific any files then the Squealer will happily grep all the files in the dictionary - though you may need to make a cup of tea in between if you have hundreds of files.

You may also invert (-v) the results to match all lines that do not include the pattern.

Some Perl Regular Expressions

    .               any character
    \d              any digit
    \s              any whitespace (space, tab, etc)
    *               0 or more
    +               1 or more
    ?               0 or 1
    .*              0 or more of any characters
    \d+             1 or more digits
    (abc|xyz)       Either "abc" or "xyz"
           

Examples

Note double quotes are sometime needed for grep pattern if spaces or special DOS characters are in it (e.g |).

    $ amount_approved -view           
                    Match "amount_approved" in the database views
                    
    $ "amount_(approved|applied)"     
                    Match either "amount_approved" or "amount_applied" in the views
                    
    $ update.*app_case -sql        
                    Search for any updates to app_case in any sql files
                    
    $ new $FileName                   
                    Search for "new" in current file
                    
    $ Hashtable -dir util -java
                    Find use of Hashtable in java files that are in directory "util"