[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] grep
- Subject: [ale] grep
- From: jmurrah at spaceghost.salug.org (Josh Murrah)
- Date: Thu, 13 Nov 1997 17:44:22 -0600 (CST)
grep -c word file(s) will give count, and nothing else.
Josh Murrah, jmurrah at salug.org, http://www.salug.org/~jmurrah, ICQ 4613433
------------------------~~~===<[^]>===~~~----------------------------
This mail is a natural product. The slight variations in spelling and
grammar enhance its individual character and beauty and in no way are to
be considered flaws or defects.
On Thu, 13 Nov 1997, Brett Becker wrote:
>
> Is there any non-shell script way to make grep return just the line
> numbers of matches and not the content of the line?
>
> For example,
>
> grep -n will return something like this:
>
> 11: exec ls
> 36: exec foo
>
> All I want are the line numbers and I do not want to have to use any sort
> of shell script to chop of the ends.
>
> If this is not possible, how would it be done with a shell script?
>
> Thanks,
> Brett B.
>