Skip to content

tavro/Minigrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

MINIGREP and how to use it

how to set up project 📁

1) download this repo

how to use ❓

poem.txt

Tunga steg, tystnad 
Ledsna noter och symfonier
Lätta steg, lystnad
Glada rytmer och melodier

Kollar ned, blundar
Bara mörker, kom fantasier
Kollar upp, lundar
Friska skogar, harmonier

Get lines containing keyword by writing:

$ cargo run keyword filename.txt

Example, getting lines containing er:

$ cargo run er poem.txt

output

Ledsna noter och symfonier
Glada rytmer och melodier
Bara mörker, kom fantasier
Friska skogar, harmonier

Notice that the program is CASE SENSITIVE:

$ cargo run L poem.txt

output

Ledsna noter och symfonier
Lätta steg, lystnad

Do following to make the program CASE INSENSITIVE:

$ CASE_INSENSITIVE=1 cargo run L poem.txt

output

Ledsna noter och symfonier
Lätta steg, lystnad
Glada rytmer och melodier
Kollar ned, blundar
Kollar upp, lundar

To save the output into a new file simply write:

$ cargo run L poem.txt > filename.txt

filename.txt

Ledsna noter och symfonier
Lätta steg, lystnad

bugs & cons ⚠️

  • unknown at this point

contributions 🏆

  • you could be on this list

communication 💬

📧 if you have any questions feel free to mail me at isakhorvath@gmail.com

🍻 know how to improve the code? feel free to send a pull request! open for collaboration

🎧 wanna hang out, talk about programming or work on a project? add me on discord: tavro#9198

☕ feeling generous? buy me a coffe https://www.buymeacoffee.com/CvaPyAznK

⭐ if you found this useful or interesting I would appreciate a star

About

Learning Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages