I have not looked at cygwin yet, but could this
be an issue of setting the environment for bash.exe.
I mean that it's just the wrong wget is picked up.
I recall that cygwin startup is a bat file, which
first sets environment like roots, paths etc.,
before the actual cygwin/bash runs.
That resolved, the "bash" J verb should be modeled
after the "shell" verb, where cmd is replaced by
a cygwin shell with appropriate environment and contexts
set up.
One other possibility is to try run jconsole from
cygwin first and then run bash as spawn, just to test
to see if it matters.
--- Dan Bron <[EMAIL PROTECTED]> wrote:
> Oleg/other forum members:
>
> Is there any way to use spawn_jtask_ to "talk to" Cygwin's bash shell? I
> thought that
>
> shell_script =: noun define
> some shell commands
> like, for example, ls
> or cat
> )
>
> require 'task'
> output =: shell_script spawn 'C:\cygwin\bin\bash.exe'
>
> would work, but it does not. The bash commands are being interpreted as if
> they're running
> under cmd.exe.
>
> For example, I have two versions of wget: one compiled for Windows, one for
> Cygwin. The Windows
> one is slightly older and doesn't support the "--save-cookies" option. So,
> in cmd.exe, this
> happens:
>
> wget --save-cookies URL
> wget: unrecognized option `--save-cookies'
>
> but the same command executes fine under bash.exe.
>
> My problem is when I try to spawn a bash from J, I get the cmd.exe behavior,
> not the bash.exe
> behavior:
>
> require 'task'
> ('wget --save-cookies URL',LF) spawn 'C:\cygwin\bin\bash.exe'
> wget: unrecognized option `--save-cookies'
>
>
> For various complicated reasons, I cannot write my shell script to a file,
> the entire thing has
> to be a J noun passed as stdin to bash.exe. Am I out of luck?
>
> -Dan
>
> PS: I recommend that spawn be modified to optionally take a "working
> directory" for the
> process. I have made this modification in my local copy.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm