diff --git a/util/notegrep/ws.sh b/util/notegrep/ws.sh new file mode 100644 index 0000000..c9166bf --- /dev/null +++ b/util/notegrep/ws.sh @@ -0,0 +1,23 @@ +:<<'info' +shellnotes - ws.sh +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +info + +if [ -f $DEFAULT_PATH/$notename ]; then + + if grep -vq $regex $DEFAULT_PATH/$notename ; then + + grep -v $regex $DEFAULT_PATH/$notename + + else + echo "Pattern matches the whole file." + return 0 + + fi + +else + echo "This note doesn't exist." + return 0 +fi