How can I search only a portion of a file?

From: Taylor, David (DTaylor@WBMI.COM)
Date: Wed Jul 17 2002 - 14:03:20 EDT


Hi *

Let's say that I have a file with the following contents:

--------------------------------------
A
A
B
A
uniquestringABC
A
B
B
A
-------------------------------------

How can I count the number of instances of 'A' up to the occurrence of
uniquestringABC? How about the instances ~after~ uniquestringABC?

There has to be an easier way than splitting the file at uniquestringABC and
counting the separate files.

TIA

David

David Taylor
Senior Software Systems Engineer
West Bend Mutual Insurance
(262) 335-7077
dtaylor@wbmi.com

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:04 EDT