help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In serious need of some grep-fu


From: Paul Jarc
Subject: Re: In serious need of some grep-fu
Date: Thu, 19 May 2005 22:18:48 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

utabintarbo@gmail.com wrote:
> The problem: I need to count the number of "bar's" between the "foo's".

sed '1,/^foo$/d;/^foo$/,$d' < file | grep -c bar


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]