Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Grep through entire source tree based on an expression or string. Will output line file and line number of matched expression.
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") {
npm install -g srcgrep
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'
FAQs
Grep through entire source tree based on an expression or string
We found that srcgrep demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.