From f60c3f4b4f52eb001a26f91a04c246812ca1e1dd Mon Sep 17 00:00:00 2001 From: Pat Ambrosio <1647347+hmngwy@users.noreply.github.com> Date: Mon, 9 Jul 2018 22:14:16 +0800 Subject: [PATCH] Fix sum --- bin/jenny | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/jenny b/bin/jenny index fe581d3..d3662fe 100755 --- a/bin/jenny +++ b/bin/jenny @@ -49,7 +49,8 @@ fi [ "$(which gsed)" ] && SED=$(which gsed) || SED=$(which sed) [ "$(which gawk)" ] && AWK=$(which gawk) || AWK=$(which awk) [ "$(which gdate)" ] && DATE=$(which gdate) || DATE=$(which date) -[ "$(which md5sum)" ] && SUM=$(which md5sum) || SUM=$(which md5) +[ "$(which md5)" ] && SUM=$(which md5) || SUM=$(which md5sum) +[ "$(which ggrep)" ] && GREP=$(which ggrep) || GREP=$(which grep) # Declare GlobalVariables declare -a IndexList @@ -105,8 +106,8 @@ begin () { continue fi - local content_sum=$(cat "$f" | $SUM) - local filename_sum=$(echo "$f" | $SUM) + local content_sum=$(cat "$f" | $SUM | cut -d ' ' -f 1) + local filename_sum=$(echo "$f" | $SUM | cut -d ' ' -f 1) echo "$T ☶ $full_file_name" forRendering=false