From 29911c641c67c313fd95cff333ca1f77b96d6c03 Mon Sep 17 00:00:00 2001
From: Joseph O'Reilly <jo8g21@soton.ac.uk>
Date: Mon, 14 Feb 2022 09:51:58 +0000
Subject: [PATCH] adding line counter of files

---
 var.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/var.sh b/var.sh
index c354e3c..84fcca9 100644
--- a/var.sh
+++ b/var.sh
@@ -7,5 +7,10 @@ do
 	echo hello $i
 done
 
+for file in ./*
+do
+	numLines=$(wc -l < $file)
+	echo the file $file contains $numLines lines of text
+done
 
 echo the value of the variable is $exampleVariable
-- 
GitLab