From a2633e0198202c75251e674ded2f5f3f323ff919 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Fri, 27 Mar 2015 18:07:29 -0700 Subject: [PATCH] Avoid use of wc command --- script-modules/util.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script-modules/util.sh b/script-modules/util.sh index 38ab0bdf..8305a1af 100644 --- a/script-modules/util.sh +++ b/script-modules/util.sh @@ -6,6 +6,11 @@ echo_cmd() { return $? } +# Lets us avoid use of wc +numwords() { + echo "$#" +} + find_tool() { while [ -n "$1" ]; do if [ -n "$1" ] && command -v "$1" > /dev/null; then