notegrep: "ws" parameter
This commit is contained in:
parent
f660de6438
commit
e4e38d0f3e
1 changed files with 23 additions and 0 deletions
23
util/notegrep/ws.sh
Normal file
23
util/notegrep/ws.sh
Normal file
|
@ -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
|
Loading…
Reference in a new issue