Well, I did have an older version of gzip:
shell 'C:\Gzip\gzip.exe -V'
gzip 1.2.4 Win32 (02 Dec 97)
Compilation options:
FINDFILE SYS_UTIME STDC_HEADERS NO_CHOWN PROTO
so I found the newer version, and replaced the older version:
shell 'C:\Gzip\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.
However, the same thing happens:
zipth
"c:\Gzip\gzip.exe -d -c "
filepth
c:\Gzip\tsttxt.txt.gz
qq =: shell zipth, filepth
rr =: spawn zipth, filepth
#qq
247
#rr
0
shell_jtask_
┌───────┬─┬─────────────────────┐
│┌┬─┬──┐│:│┌─────┬─────────────┐│
│││&│$:││ ││spawn│┌───────┬─┬─┐││
│└┴─┴──┘│ ││ ││cmd /c │,│]│││
│ │ ││ │└───────┴─┴─┘││
│ │ │└─────┴─────────────┘│
└───────┴─┴─────────────────────┘
spawn_jtask_
┌─┬─┬─────────────────────────────┐
│3│:│'' spawn y │
│ │ │: │
│ │ │'or ow'=. CreatePipe 1 │
│ │ │'ir iw'=. CreatePipe 2,#x │
│ │ │ph=. (ow,ir) CreateProcess y │
│ │ │CloseHandle ir │
│ │ │if. #x do. x WriteAll iw end.│
│ │ │CloseHandle iw │
│ │ │CloseHandle ow │
│ │ │r=. ReadAll or │
│ │ │CloseHandle or │
│ │ │CloseHandle ph │
│ │ │r │
└─┴─┴─────────────────────────────┘
Skip
On Tue, Nov 8, 2011 at 3:14 AM, David Mitchell <[email protected]>wrote:
> 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
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm