notegrep: "sl" parameter
This commit is contained in:
parent
e3f7e7414f
commit
23f9a6f6e4
1 changed files with 19 additions and 0 deletions
19
util/notegrep/sl.sh
Normal file
19
util/notegrep/sl.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
:<<'info'
|
||||
shellnotes - sl.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
|
||||
out="$(grep -n $regex $DEFAULT_PATH/$notename | wc -l)"
|
||||
if [ $out -eq 0 ]; then
|
||||
echo "No matching lines found."
|
||||
else
|
||||
grep -n $regex $DEFAULT_PATH/$notename
|
||||
fi
|
||||
|
||||
else
|
||||
echo "No such file."
|
||||
|
||||
fi
|
Loading…
Reference in a new issue