diff options
Diffstat (limited to 'bin/grepc')
-rwxr-xr-x | bin/grepc | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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" \ |