From f0e69b77f0755f0148a0322391e02d4e28cb7ce4 Mon Sep 17 00:00:00 2001 From: s450026 Date: Thu, 12 Nov 2020 18:02:57 +0100 Subject: [PATCH] Dodano zadanie B01 --- TaskA01/run | 2 ++ TaskB01/B01.py | 11 +++++++++++ TaskB01/run | 2 ++ 3 files changed, 15 insertions(+) create mode 100755 TaskA01/run create mode 100644 TaskB01/B01.py create mode 100755 TaskB01/run diff --git a/TaskA01/run b/TaskA01/run new file mode 100755 index 0000000..4fee1da --- /dev/null +++ b/TaskA01/run @@ -0,0 +1,2 @@ +#!/bin/bash +python3 TaskA01/A01.py "$@" \ No newline at end of file diff --git a/TaskB01/B01.py b/TaskB01/B01.py new file mode 100644 index 0000000..bebc094 --- /dev/null +++ b/TaskB01/B01.py @@ -0,0 +1,11 @@ +import re +import sys + + +def line_contain_hamlet(line): + return re.search('Hamlet', line) + + +for line in sys.stdin: + if line_contain_hamlet(line): + print(line.rstrip('\n')) \ No newline at end of file diff --git a/TaskB01/run b/TaskB01/run new file mode 100755 index 0000000..c99ba5b --- /dev/null +++ b/TaskB01/run @@ -0,0 +1,2 @@ +#!/bin/bash +python3 TaskB01/B01.py "$@" \ No newline at end of file