HP3000-L Archives

November 2011, 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:
Gary Stephens <[log in to unmask]>
Reply To:
Gary Stephens <[log in to unmask]>
Date:
Mon, 28 Nov 2011 20:06:26 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (88 lines)
Depending on the number of files, but more the size of the files, you may find posix here can be your friend.
I was initially amazed at how quickly diff,awk,grep and their friends could do in a tenth of the time, what I had done in mpe raw for years.
Not everyones cup of tea for sure, and for the purist out there, and I have been one, will say Posix is really living outside of your comfort zone, but its pretty awesome.
Cheers

On 28 Nov 2011, at 19:04, Pickering, John (NORBORD) wrote:

> I think I answered my own question, mostly through experimentation. 
> 
> 
> 
> First I built a list of files in the first fileset:
> 
> repeat
> 
>   setvar filenames "!filenames,!mpexcurrentfile"
> 
> forfiles [log in to unmask]
> 
> 
> 
> Then I nested the second repeat...forfiles inside a repeat...foreach:
> 
> repeat
> 
>  file filea = !filea
> 
>  repeat
> 
>     file fileb=!mpexcurrentfile
> 
>     run compare.pub.robelle
> 
>  forfiles [log in to unmask]
> 
> foreach filea=!filenames
> 
> 
> 
> There's more to the code than that but that is the structure. Seems to
> work :)
> 
> 
> 
> JWP
> 
> 
> 
> ________________________________
> 
> From: Pickering, John (NORBORD) 
> Sent: Monday, November 28, 2011 12:33 PM
> To: [log in to unmask]
> Subject: can mpex repeat forfiles be nested?
> 
> 
> 
> I have a need to compare each of the files in a fileset against each of
> the files in a second fileset and look for dupicates. This could be
> easily accomplished if mpex's repeat forfiles construct could be nested.
> Is there any way to do this?
> 
> 
> 
> Example:
> 
> Compare each of the files in [log in to unmask] against each of the files in
> [log in to unmask] using Robelle's compare program and check the compareoutcount
> jcw after each.
> 
> The fileset [log in to unmask] contains foo1.data, foo2.data, ..., foo9.data.
> 
> The fileset [log in to unmask] contains sv1aa.data, sv2aa.data, ..., sv9aa.data,
> sv1bb.data,sv2bb.data, ..., sv9bb.data, sv1cc.data, ...
> 
> 
> 
> Thanks for suggestions,
> 
> JWP
> 
> 
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2