# srcgrep

> Grep through entire source tree based on an expression or string

Latest version **0.1.0** (published 2015-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install srcgrep
pnpm add srcgrep
yarn add srcgrep
bun add srcgrep
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-01-13 |
| First published | 2015-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Greg Sabia Tucker |
| Maintainers | engineeringmode |
| Keywords | srcgrep, grep, search, node, tools |

## Links

- npm: https://www.npmjs.com/package/srcgrep
- Repository: https://github.com/EngineeringMode/srcgrep
- Issues: https://github.com/EngineeringMode/srcgrep/issues
- npm.io page: https://npm.io/package/srcgrep

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2015-01-13

## README

srcgrep
==========

Grep through entire source tree based on an expression or string. Will output line file and line number of matched expression.

## Example

Searching the source code of all files in the path provided, including file and line number.

    $ srcgrep -e '\$path.*' -i -p /var/www/apps/myapp
      /var/www/apps/myapp/myfile.pl:50:    my ($path, $ignore, @regexp, $test, $outfile, @patterns, @excludes);
      /var/www/apps/myapp/myfile.pl:55:    "p|path:s" => \$path,
      /var/www/apps/myapp/myfile.pl:69:    if ("$path") {

## Install

```bash
npm install -g srcgrep
```

    
## Usage:

    Usage:  srcgrep [OPTIONS] -e PATTERN [-e PATTERN, -e ...]
    
    The output will be in FILENAME:LINE#:LINE format convenient for gvim.
    
    Options:
    
    -h, --help     This usage statement.
    
    -i, --ignore   Ignore case when searching.
    
    -E, --exclude   Exclude filename pattern.
    
    -o, --outfile  Produce an outfile of results in /tmp.  The file
        will be named srcgrep-YYYYmmddHHMMSS.
    
    -t, --test     Do not run the search, but print the command instead.
    
    -p, --path     Path to search.  If left empty, the script will try to
        find the source directory.
    
    -e, --regexp   Search pattern using regular expressions. Additional
        patterns will result in OR searches
    
    
    EXAMPLES:
    
    To find source files matching either 'File' or 'Foo bar':
    srcgrep -e File -e 'Foo bar'
    
    To find files in /tmp with lines starting with Test or test:
    srcgrep -i -p /tmp -e '^test'


## License
##### [MIT License](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/srcgrep · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
