diff --git a/util/notegrep.sh b/util/notegrep.sh index a573908..ffddca6 100644 --- a/util/notegrep.sh +++ b/util/notegrep.sh @@ -124,6 +124,9 @@ function notegrep() { case $option in -sc | --split-char) . ~/.shellnotes/util/notegrep/sc.sh + ;; + -cl | --count-lines ) + . ~/.shellnotes/util/notegrep/cl.sh ;; *) echo "Invalid parameter. Proceeding in normal grep mode." diff --git a/util/notegrep/cl.sh b/util/notegrep/cl.sh new file mode 100644 index 0000000..622ed9e --- /dev/null +++ b/util/notegrep/cl.sh @@ -0,0 +1,9 @@ +:<<'info' +shellnotes - cl.sh +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +info + +out="$(grep $regex $DEFAULT_PATH/$notename | wc -l)" +echo "Compressed $out lines of grep output." \ No newline at end of file