use std::fs;
use std::env;
fn main(){
let cmd_line:Vec<String>=env::args().collect();
/*println!("Enter path :");
let mut path=String::new();
std::io::stdin().read_line(&mut path).expect("Failed to read");
println!("Enter query to search :");
let mut query=String::new();
std::io::stdin().read_line(&mut query).expect("Failed to read");*/
let path=&cmd_line[1].trim().to_string();
let query=&cmd_line[2].trim().to_string();
let content=fs::read_to_string(path).expect("Failed to read");
let mut found:bool=false;
for line in content.lines(){
if line.contains(query){
print!("{} is found",line);
found=true;
}
}
if found==false{
println!("Request query not found in the given file path");
}
}