[TriLUG] how to grep
Mike Norwood
norwoodm at earthlink.net
Fri Feb 7 09:20:56 EST 2003
Thanks,
This works for what I need to do. The cut command didn't work as well
because I need to get the whole line of data, not just the number.
Thanks again.
Mike
On Thu, 6 Feb 2003, Greg Cox wrote:
> > I need to grep a certain number from a file, but only when it is a certain
> > location on each line, for example I want to find 12345678901, but only if
> > it is in position 46 through 56 on each line in the file, not if it is in
> > any other position.
>
> cat file | egrep '^.{45}12345678901'
>
> _______________________________________________
> TriLUG mailing list
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
> http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
>
More information about the TriLUG
mailing list