From 675c5d6c8159c7d374d96d309135ffc2aa564e4f Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Mon, 24 Feb 2014 07:26:19 +0200 Subject: [PATCH] interactive grep, igrep --- qcd_function | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qcd_function b/qcd_function index 9e987b0..635a71f 100644 --- a/qcd_function +++ b/qcd_function @@ -205,3 +205,15 @@ function rmv () { fi done } + +function igrep () { + # Interactive grep + local args + args="-i -e value" + while true + do read -e -i "$args" args + echo $@ + grep $args "$@" + done + +}