Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2011 17:42:21 -0700
From:      Gary Kline <kline@thought.org>
To:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   scrpt help neded...
Message-ID:  <20110721004208.GA32046@thought.org>

Next in thread | Raw E-Mail | Index | Archive | Help

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




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110721004208.GA32046>