grepy 0.1.0

A tool to search files
Documentation
  • Coverage
  • 0%
    0 out of 7 items documented0 out of 4 items with examples
  • Size
  • Source code size: 4.06 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • jasonleonhard/grepy
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jasonleonhard

Unit Tests

cargo run tests sample.text

Run

cargo run someStringToSearch someFileName

cargo run the sample.txt # shows 2 matching lines

cargo run t sample.txt   # shows 4 matching lines

cargo run \  sample.txt  # match all lines with spaces, in this case all lines except the new line

Executable from anywhere

cargo build --release
cd ~/code/rust/grepy/target/release
./grepy run t sample.txt                                # same as # cargo run t sample.txt
~/code/rust/grepy/target/release/grepy run t sample.txt # same as # cargo run t sample.txt

so.... just add rust to your path and you can then run from anywhere

notice current permissions

these are fine and the same as chmod +x grepy -rwxr-xr-x 2 whoami staff 327K Aug 13 12:54 grepy

./grepy com some/path/to/some/file

it will create a binary file

./target/release/grepy

This binary is completely self-contained, so you can move or copy it to somewhere else on your computer.

Run from anywhere

This is my first rust lang answer on stack overflow

publish

cargo publish

ref