From 40f323217a3bc92fcdf6e0e21b00e6a0c2d2a5c6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hypki Date: Mon, 8 May 2023 16:18:28 +0200 Subject: [PATCH] added ex1.sh script; --- tabledata/ex1.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 tabledata/ex1.sh diff --git a/tabledata/ex1.sh b/tabledata/ex1.sh new file mode 100755 index 0000000..588322b --- /dev/null +++ b/tabledata/ex1.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# iterating line-by-line over the input file +numOfPeople=`cat $1 | grep 'Poland' | wc -l` + +echo "Num. of people from Poland is $numOfPeople"