2021-06-23 18:27:44 +02:00
|
|
|
:<<'info'
|
|
|
|
shellnotes - cf.sh
|
|
|
|
(C) Dimitris Marakomihelakis
|
|
|
|
Released under the "All rights reserved" category. See the RIGHTS.txt file
|
|
|
|
in /docs/github/ for its full text.
|
|
|
|
info
|
|
|
|
|
|
|
|
files="$(grep -rwl $regex $DEFAULT_PATH/* | wc -l)"
|
|
|
|
|
|
|
|
if [ $files -eq 1 ]; then
|
|
|
|
echo "Found $files matching file in $DEFAULT_PATH."
|
|
|
|
elif [ $files -gt 1 ]; then
|
|
|
|
echo "Found $files matching files in $DEFAULT_PATH."
|
2021-06-28 12:42:57 +02:00
|
|
|
echo -n "Show files?(Y/N): " && read show
|
2021-06-23 18:27:44 +02:00
|
|
|
case $show in
|
|
|
|
yes | y | Y | YES | Yes )
|
|
|
|
grep -rwl $regex $DEFAULT_PATH/*
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo "No matching files found."
|
|
|
|
fi
|
|
|
|
|