Skip to content
/ min-grep Public

A concise implementation of the grep utility. It print lines matching a given pattern.

License

Notifications You must be signed in to change notification settings

nrmm/min-grep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

min-grep

A minimal implementation of the grep utility. It simplies print lines matching a given regex.

Min-grep has the following features:

  • Search recursively in a directory
  • Print line numbers matching a pattern
  • Match case insensitive
  • Understand pipes

Nothing else ;-)

It's meant for systems that don't have mechanisms to search files with a given content.

INSTALL

There's no installation. All you need is a Perl environment.

EXAMPLES

Search recursively all the files under the current directory and print line numbers when a match is found:

perl min-grep -rn "foo" .

Print all lines with floating point numbers:

perl min-grep "\d+.\d+" foo.txt

Input comes from a pipe. Match lines containing the substring 'bar':

echo "FOOBAR" |perl min-grep -i "bar" -

About

A concise implementation of the grep utility. It print lines matching a given pattern.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages