From: Brian Sheehan <sheehan () scripps ! edu>
To: tru64-unix-managers
Subject: FOLLOWUP: grep
Date: Thu, 09 Oct 1997 22:41:50 +0000 [thread overview]
Message-ID: <96078618110367.tru64-unix-managers.marc@archive.invalid> (raw)
A small P.S. to the summary for grep, and apologies for the bandwidth
used......
It began to bug me - imagine if the desired character was byte 73....! :-)
So after a long while (I wonder how I can explain what I was doing
half the afternoon!) I came up with:
grep A3L0 trash.old | grep '^.\{21\}7'
It's only a few characters shorted, and a lot less simple. But it might
be useful if the character being sought is near the end of the input line.
You should see the files I generated to test this, and the .history file
of my numerous "grep" attempts!!! Anyway, sorry for flogging the
proverbial dead horse. On with your regularly scheduled mailing list.
- Brian
Brian Sheehan,
The Scripps Research Institute,
La Jolla CA 92037, USA
(619) 784-9379
On Thu, 9 Oct 1997, Paul Kitwin wrote:
> Thanks for the multitude of rapid resonses from Pirie, Gene, Eric,
> Slone, and the many more pouring in as I write this.
>
> The answer is (in my case):
>
> grep A3L0 trash.old | grep "^......................7"
>
> This is where I am looking for every line with A3L0, and has a 7 in the
> 22nd place.
>
> Thanks again to all.
>
> P.S. I LOVE YOU GUYS!
>
>
> >From the dark land of the mole people
reply other threads:[~1997-10-09 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox