I use Windows gzip/gunzip from:
http://gnuwin32.sourceforge.net/
In J7, I can use them the following way, once gzip and gunzip have been
installed in a directory in my PATH. An alternative would be to reference gzip
and gunzip with a fully specified path. yy contains the fully specified file
name that I am working with.
spawn_jtask_ 'gzip -v ',yy
C:\Users\me\j64-701-user\temp\foo1.ijs: 68.2% -- replaced with
C:\Users\me\j64-701-user\temp\foo1.ijs.gz
spawn_jtask_ 'gunzip -v ',;yy,'.gz'
C:\Users\me\j64-701-user\temp\foo1.ijs.gz: 68.1% -- replaced with
C:\Users\me\j64-701-user\temp\foo1.ijs
--
David Mitchell
On 11/4/2011 0:48, Skip Cave wrote:
> The LOG file in each folder is actually LOG.gz, which has been compressed
> with the open source, patent-free gzip program (http://www.gzip.org). The
> file, when expanded, produces a file named LOG with no extension. Once
> expanded, the LOG file is just a plain ASCII text file.
>
> My first issue will be to discover if there is any utility in the J
> libraries that will expand this .gz file to is native form on a Windows
> machine.
>
> Ric Sherlock has shown us code that will find the LOG.gz file in each
> directory. I will be trying that out later tonight.
> ; (<empty'') -.~ (1 dir ,&'/LOG') each dirpath 'jsource'
> I will need to figure out what libraries to load in J to get the "empty",,
> "each" and "dir" verbs, so I can try this out.
>
> Once I figure out how to find and open the files, I will need string
> searching utilities to extract the text string I need.
>
> Can this be done in a non-iterating, array style in J, or will I need
> control loops to iterate through all the files?
>
> Skip
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm