Skip,

If type just the names of the verbs, J will display their definitions:

    spawn
spawn_jtask_
    shell
shell_jtask_

So, the versions without the _jtask_ are basically 'aliases' of the _jtask_ 
versions.

    shell_jtask_
''&$: :(spawn ('cmd /c ' , ]))

I am surprised that you get different results from shell and spawn in this 
case. 
  I just ran a similar test as you ran:

    g
C:\gnuwin32\bin\gzip.exe -d -c
    f
C:\Users\me\j64-701-user\temp\foo1.ijs.gz

    qq=:shell g,f
    rr=:spawn g,f
    $qq
1605
    $rr
1605

For me, shell and spawn got the same result.

What version of gzip are you running?  Perhaps there are differences between 
the 
versions of gzip you and I have.

    shell 'C:\gnuwin32\bin\gzip.exe -V'
gzip 1.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
--
David Mitchell

On 11/8/2011 2:16, Skip Cave wrote:
> Thanks Raul! Your hint allowed me to avoid using the overly verbose 7z.exe,
> and use gzip instead, which doesn't pollute the stout with completion text:
>
>     filepth =: 'c:\Gzip\tsttxt.gz'
>     zipth =: '"c:\Gzip\gzip.exe -d -c "'
>     shell zipth, filepth
>
> This is a test file 1 2 3 4 5 6 7 8 9 0
> This is a test file 1 2 3 4 5 6 7 8 9 0
> This is a test file 1 2 3 4 5 6 7 .... etc.
> This is the contents of file tsttxt.txt file that printed out (with no
> extra text!)...
>
> Interestingly, the alternate 'spawn zipth, filepth' does not produce any
> stdout, so the shell command is definitely required.
>
> By the way, what is the difference between shell_jtask_ and shell? or
> spawn_jtask_ and spawn?
>
> Skip
>
>
> On Sat, Nov 5, 2011 at 8:01 AM, Raul Miller<rauldmil...@gmail.com>  wrote:
>
>> Note that gzip also has an option to provide its result on stdout
>> instead of replacing the file
>>
>> http://www.mkssoftware.com/docs/man1/gzip.1.asp
>>
>> -c (or --stdout)
>>
>> --
>> Raul
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to