jb is a symlink to the actual jconsole. I use ja for j602 while jb for j701.  
Linux kernel has no problem if the shebang line was

#!/usr/local/j64-701/bin/jconsole

But J interpreter knows nothing about the special meaning of #! and it will try 
to
execute the whole line as if it is a normal J sentence and will raise error

try type these sentence in jconsole session.

#!/foo/bar/bla
#!/foo/bar/bla+bla
#!/foo/bar/bla-64

Чтв, 29 Сен 2011, David Ward Lambert писал(а):
> Response to John Baker's request for unix shell script
> Message-ID:
> <CABc=tNyZuqgGK4tL0aRAXRkb7=ozddfo9pyfol2p+zuaau4...@mail.gmail.com>
> and a follow on to bill lam's message
> Message-ID: <[email protected]>
> 
> I do not know what Bill's  jb  program is and have been unable to
> execute j scripts that start with #! /path/jconsole
> Instead I use a bigger hammer:  exec
> The j script can appear in the shell script as shown.
> Warning, I modified his j code without testing.  (A further optimization
> would be to read only the last character of the file.)
> Quoting 'EOF' prohibits parameter expansion in the here document.  j
> programs often contain $ .  Copy the following to file (say s.sh),
> follow it's instructions.
> 
> #!/bin/bash
> 
> # $ chmod +rx s.sh     # change mode to executable
> # $ ./s.sh *suspects*  # append new lines if necessary to suspect files
> 
> F=/tmp/j.ijs
> 
> cat<<'EOF'>$F  # copy here document to EOF to file of expanded $F
> 3 : 0'' NB. If necessary, append LF to files listed on command line
> for_f. }.ARGV_j_ do.
>   if. LF~:{:1!:1 f do.
>     stdout LF,>f
>     LF 1!:3 f
>   end.
> end.
> )
> exit 0
> EOF
> 
> J=/usr/local/j64-701/bin/jconsole
> 
> exec $J $F $*
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to