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:
"Emerson, Tom # El Monte" <[log in to unmask]>
Reply To:
Emerson, Tom # El Monte
Date:
Tue, 26 Sep 2000 12:44:19 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (139 lines)
I don't recall if MPEX has been mentioned, but it does specifically have a
"keepamdates" option ehancement to the print command. [primarily for the
reason you mention here -- so as not to update the "last access date" when
merely "searching"]

There are also a number of enhanced "file attribute functions", such as
FCONTAINS and FSEARCHSTRING/FSEARCHEXP.  The first simply returns yea/nea as
to whether the file contains the string, and FSEARCH... returns the number
of lines found that match either the explicit string given or the "search
expression".  Actually, FCONTAINS is a specialized version of FSEARCHEXP --
the "expression" is "found > 0"...

Because these are "attributes", they can be used in fileset selection
criteria, so you could do something like this:

%repeat
%   echo ![strwrite(mpexcurrentfile:26,'  ',rfile.fsearchstring(<target>)]
%forfiles <fileset>(fcontains(<target>)

[note: I haven't checked in a while, but I believe the enhanced attribute
functions do not update the last access dates]

<target> is obviously the string you're looking for, note it needs to be
supplied twice

<fileset> is the source fileset you're interested in, in standard LISTF
format (@.SOURCE, for instance)

> -----Original Message-----
> From: joe dumas [mailto:[log in to unmask]]
> Sent: Tuesday, September 26, 2000 5:27 AM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] Search utility..
>
>
> When searching files for a given string, is there an
> alternative to grep
> that does not change the "last accessed" date on every file
> it searches?
>
> Thanks,
> ---
> Joe Dumas    (Visit our Web Site at http://www.cpii.com/bmd )
> Sr. Programmer
> Communications & Power Industries
> Beverly Microwave Division
> (978) 922-6004 x434
> fax  (978) 922-8914
>
> > -----Original Message-----
> > From: Simonsen, Larry [mailto:[log in to unmask]]
> > Sent: Monday, September 25, 2000 3:33 PM
> > To: [log in to unmask]
> > Subject: Re: Search utility..
> >
> >
> > Here is a grep script
> > showtime
> > setvar grepfile ups("!where")
> > if len("!grepfile") =0 then
> >    setvar grepfile  "SOURCEJOB"
> > endif
> > showvar grep@
> > echo                                                >greptmp
> > echo grep -i "!str" !where                      >>greptmp
> > echo exit                                          >>greptmp
> > echo                                               >>greptmp
> > sh.hpbin.sys <greptmp
> > showtime
> >
> > -------------------------------------------------
> > Larry Simonsen                Phone: 801-489-2450
> > Flowserve Corporation     Fax: 801-491-1750
> > PO Box 2200                    http://www.Flowserve.com
> > Springville, UT 84663      e-mail: [log in to unmask]
> > -------------------------------------------------
> > All opinions expressed herein are my own and reflect, in no
> > way, those of my
> > employer.
> >
> >  -----Original Message-----
> > From:   [log in to unmask] [mailto:[log in to unmask]]
> > Sent:   Monday, September 25, 2000 12:40 PM
> > To:     [log in to unmask]
> > Subject:        Search utility..
> >
> > Hi all,
> >
> > 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.
> >
> > With Best Regards
> > Raghu.
> >
> >
> >
> > The information contained in this message and any attached
> > documents is
> > intended only for the personal and confidential use of the
> designated
> > recipient(s).  This message may be a confidential and privileged
> > communication.  If the reader of this message is not the
> > intended recipient
> > (or an agent responsible for delivering it to the intended
> > recipient), you
> > are hereby notified that any unauthorized distribution or
> > copying of this
> > email or the information contained in it is strictly
> > prohibited.  If you
> > have received this communication in error, please notify us
> > immediately by
> > replying to this message and deleting it from your computer.
> > BlueCross
> > BlueShield of Tennessee, Inc., and its subsidiary and
> > affiliate companies
> > are not responsible for errors or omissions in this e-mail
> > message.  Any
> > personal comments made do not necessarily reflect the views
> > of BlueCross
> > BlueShield of Tennessee, Inc.
> >
>

ATOM RSS1 RSS2