aboutsummaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
Diffstat (limited to 'g')
-rwxr-xr-xg30
1 files changed, 0 insertions, 30 deletions
diff --git a/g b/g
deleted file mode 100755
index 7c55707..0000000
--- a/g
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# g -- poor man's ack
-
-IFS='
-'
-
-pat=
-opt=
-i=0
-
-while [ $((i++)) -lt $# ]; do
- case "$1" in
- -*) opt=`printf '%s%s\n' "$opt" $1`
- shift ;;
- *) break ;;
- esac
-done
-
-[ $# -eq 0 ] && { echo usage: $0 [-...] pattern [file ...] 1>&2; exit 1; }
-
-pat=$1
-shift
-
-files=`find . -name '*.c' -or -name '*.h' -or -name '*.cc' | sed s,./,,`
-[ -z "$files" ] && [ -z "$*" ] && { echo no matching files found 1>&2; exit 1; }
-
-# todo (?): treat argument \*.x like -or -name \*.x
-
-p grep $opt -n "$pat" $files "$@"