<[log in to unmask]> writes:
> 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.
>
> I would not want a particular Source3 to be displayed saying '0'
Occurences
> found ? In simple words, I need a GREP version on HPe3000 !! Is there a
way
> this can be accomplished through any command in HPe3000 ? If so, how ?
> Thanks for all your replies in advance.
>
Why not use grep?
(PUB.WERTH):sh
########################################################################
MPE/iX Shell and Utilities (A.50.02)
COPYRIGHT (c) Hewlett-Packard Company 1992, All Rights Reserved.
########################################################################
shell/iX> grep -ic MANAGER /WERTH/JOBS/*
/WERTH/JOBS/ABORTALL:3
/WERTH/JOBS/ACCEPTX:0
/WERTH/JOBS/BACKUP:1
/WERTH/JOBS/BSO:1
/WERTH/JOBS/COBXREF:0
/WERTH/JOBS/FTPTEST:0
/WERTH/JOBS/LOGSTART:0
/WERTH/JOBS/MSGJOB:0
/WERTH/JOBS/PINGOUT:0
/WERTH/JOBS/SPROUTE:0
/WERTH/JOBS/TDS:0
/WERTH/JOBS/TEST:1
/WERTH/JOBS/TEST2:0
/WERTH/JOBS/TESTJOB:0
/WERTH/JOBS/TIMECHG:1
shell/iX>
shell/iX> grep -li manager /WERTH/PUB/*
ABORTALL
BACKUP
BSO
TEST
TIMECHG
shell/iX>
Doug Werth Beechglen Development Inc.
[log in to unmask] Cincinnati, Ohio