From owner-freebsd-questions@FreeBSD.ORG Thu Jul 21 00:42:22 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA76F1065677 for ; Thu, 21 Jul 2011 00:42:22 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id AED038FC0A for ; Thu, 21 Jul 2011 00:42:22 +0000 (UTC) Received: by thought.org (Postfix, from userid 1001) id D38F5E808AC; Wed, 20 Jul 2011 17:42:21 -0700 (PDT) Date: Wed, 20 Jul 2011 17:42:21 -0700 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20110721004208.GA32046@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 24++ years of service to the Unix community. User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: scrpt help neded... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 00:42:22 -0000 Y'all, Not sure where it was the calendar or something else that suddenly made my tying go South. maybe both. --oh, yes, i still need to buy a new clicky kybd. but that won't help with the script i need. back hen i worked from cray reseach in WI, a shell /bin/sh wizard cooked up what i wanted in minutes. i have lost in in the 20+ years so maybe some shell or perl guru can help me. I'm looking for a script that takes on arg and lets me vi/vim into the r esults. Let's say that I'm looking for the string 201107 in a slew of files. the script find it with grep---not grep -w, just grep. collect es the filenames and lines (grep -n) and saves then temporarily, then points vim or vi at each file+linenumbr and execs it for me. the fewer keystrokes, the better. can anybody help me? tia, gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.51a release of Jottings: http://jottings.thought.org