scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

commit a0a5666a3e96cf7a06dd4f7c1f11316fc471bdc2
parent e8d7e0ee54750feb9d11b2a3836827c606e0360a
Author: gearsix <gearsix@tuta.io>
Date:   Mon, 26 Jul 2021 20:55:28 +0100

fix in gfind

Diffstat:
Msrc/gfind.sh | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/gfind.sh b/src/gfind.sh @@ -5,17 +5,11 @@ # e.g.$ gfind dogs/ "shades" if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then - echo "Usage: gfind [OPTIONS] DIRECTORY EXPRESSION" + echo "Usage: gfind DIRECTORY EXPRESSION" echo "" echo "call grep EXPRESSION on all files in DIRECTORY" - echo "" - echo "OPTIONS" - echo " -r recursively search DIRECTORY" exit fi -ARGS="-nw" # print line #, match whole word -if [ "$1" == "-r" ]; then ARGS="-rnw"; fi # recursive - -grep $ARGS $1 -e "$2" +grep -rnw $1 -e "$2"