summaryrefslogtreecommitdiffstats
path: root/bin/grepc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/grepc')
-rwxr-xr-xbin/grepc10
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/grepc b/bin/grepc
index 6d05b25..46919fa 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -5,7 +5,6 @@
iflag='';
lflag='';
kflag='no';
-rflag='no';
tflag='no';
t_e='no';
t_fp='no';
@@ -39,7 +38,7 @@ grepc_err()
grepc_parse_cmd()
{
- while getopts "chiklrt:" opt; do
+ while getopts "chiklt:" opt; do
case "$opt" in
c)
cflag='yes';
@@ -58,9 +57,6 @@ grepc_parse_cmd()
lflag='l';
kflag='yes';
;;
- r)
- rflag='yes';
- ;;
t)
case "$OPTARG" in
e)
@@ -238,8 +234,8 @@ grepc_search()
grepc_patterns "$identifier" >"$p";
- if test "$rflag" = 'no'; then
- pcre2grep -${iflag}${lflag}HMn -f "$p" $files;
+ if test -z "$files"; then
+ pcre2grep -${iflag}${lflag}HMn -f "$p";
else
find $files -type f \
| xargs grep -${iflag}lPI -- "$identifier" \