Coder Social home page Coder Social logo

grepru's Introduction

grepru

This is a clone of the popular grep linux command written in rust.

Rust

Description

grepru searches for PATTERNS in each FILE. grepru is used in a shell command.

Current supported functionality:

Search for string in file

grepru "if the lady" file.txt

Print version

grepru --version || grepru --V

Print only a count of selected lines per FILE

grepru "hello" file.txt -c

Prefix each line of output with the 1-based line number within its input file.

grepru "hello" file.txt -n

License

The library is available as open source under the terms of the MIT License.

grepru's People

Contributors

alexjuca avatar ariadne3512 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ariadne3512

grepru's Issues

Functionality - Print count of selected lines per FILE

This feature should add the following optional argument to grepru cli.
-c, --count print only a count of selected lines per FILE

This allows grepru to effectively print a count of how many times that line appears in the text.

Example:
words.txt >

hello
hello
hi

command:

grepru "hello" -c words.text

should print:

2

command:

grepru "hi" -c words.text

should print:

1

implement `version` functionality

This functionality allows the user to print out the current version of grepru.

Example.

grepru --version or grepru -V
// Should print
v1.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.