From 26da0687357f0d4055b6089c7495ebbd8460224b Mon Sep 17 00:00:00 2001 From: surister Date: Mon, 16 Dec 2019 12:16:05 +0100 Subject: [PATCH] question counter script improved --- scripts/count_questions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/count_questions.sh b/scripts/count_questions.sh index 25c22c5..43a1ffa 100755 --- a/scripts/count_questions.sh +++ b/scripts/count_questions.sh @@ -1,3 +1,5 @@ #!/bin/bash -echo $((7 + $(cat README.md | grep \<\/summary\> | wc -l))) +# We dont care about non alphanumerics filenames so we just ls | grep to shortern the script. + +echo $(( $(ls ./scenarios/ | grep ".*md" -c) + $(grep \ -c README.md) ))