HP3000-L Archives

September 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Mon, 25 Sep 2000 15:41:16 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Re:

> I need to search for a particular string through certain files in a group
> and also need to find out the number of times the string occurs. I mean.. if
> I am looking for "WHAT" in [log in to unmask], I need to get a output like :
>
> Source1 - 2 occurences found
> Source2 - 10 Occurences found
> Source4 - 3 Occurences found.

<plug>

Our MAGNET tool can do this...and preserve file dates, too.  The following
example searches all files whose name starts with "GETE", for the
word "what", case insensitive.

   :magnet -fgete@ what -count -i

   MAGNET [2.25] - LPS Toolbox [A.07b]      (c) 1995 Lund Performance Solutions

   This product is licensed to: Allegro Consultants, Inc.

   GETENV2.SOURCE.SIELER        (  3 found)
   GETENV3.SOURCE.SIELER        (  1 found)

   Scanned 3 files in 0.319 seconds
   End Run

Info at www.lund.com.

Note: -count is new in version 2.25;
      -i is new in 2.25 (use -c for older versions of MAGNET)
</plug>

Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2