summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 6366b0f..0ac993e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,7 +14,17 @@ struct Cli {
}
fn main() {
+
let args = Cli::parse();
+ let content = std::fs::read_to_string(&args.path)
+ .expect("could not read file");
+
+ for line in content.lines() {
+ if line.contains(&args.pattern) {
+ println!("{}", line);
+ }
+ }
+
}