package p19_napisy.regex;

import java.io.BufferedReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Scanner;

public class AnalizaLogow1 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.print("Podaj nazwę pakietu: ");
		String pakiet = sc.nextLine();
		
		try(BufferedReader input = Files.newBufferedReader(Paths.get("pliki/history.log"))) {
			String line;
			while((line = input.readLine()) != null) {
				if(line.contains(pakiet)) {
					System.out.println(line);
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		};

	}

}
