It should work as described, i.e. you should be able to do:

1. link jc to jconsole (as Ric suggests)

~$ ln -s /home/chris/j64-802/bin/jconsole jc

2. define t1.sh as:

#!/home/chris/jc
echo +/*:0".>,.2}.ARGV
exit''

3. make t1.sh executable:

~$ chmod +x t1.sh

4. call it:

~$ ./t1.sh 3 4
25


On Tue, Jul 29, 2014 at 2:05 PM, Don Guinn <[email protected]> wrote:

> Thanks to both you and Chris. I am able to find jconsole through both path
> and exporting the name "j" to start jconsole. Both work great, but getting
> hashbang in the j script to take the name jconsole through the path is a
> little tricky. Hashbang has some interesting restrictions. I had to change
> the first line to:
> #!/usr/bin/env jconsole
>
> I haven't installed java on UBUNTU yet, so no name conflict so far.
>
> Still trying to get "Open With" to work. Also symbolic link I don't have
> working yet either.
>
>
> On Tue, Jul 29, 2014 at 2:10 PM, Ric Sherlock <[email protected]> wrote:
>
> > If you have java installed on your system then a program called jconsole
> is
> > probably already in your path. I've taken to naming my symbolic link: jc
> >
> >
> > On Wed, Jul 30, 2014 at 7:36 AM, chris burke <[email protected]>
> wrote:
> >
> > > An alternative to renaming the J installation folder is to create a
> > > symbolic link to jconsole, and reference that instead, e.g.
> > >
> > > ~$ ln -s j64-802/bin/jconsole
> > > ~$ ls -l jconsole
> > > lrwxrwxrwx 1 chris chris 20 Jul 29 12:31 jconsole ->
> j64-802/bin/jconsole
> > >
> > > Also, if you create the symbolic link on your path, then you can simply
> > > enter "jconsole" in the terminal to run it.
> > >
> > >
> > >
> > > On Tue, Jul 29, 2014 at 8:46 AM, Don Guinn <[email protected]> wrote:
> > >
> > > > It was not a problem getting around the minus sign problem. I simply
> > > > renamed the J directory from j64-802 to j64_802 and everything worked
> > > fine.
> > > > What concerned me was that the default name chosen for the 64 bit
> > version
> > > > causes hashbang to fail. It is not much of a problem, probably not
> > worth
> > > > fixing.
> > > >
> > > > Thank you for the lead on how to handle the "Open With" question. I
> > will
> > > > study it. I am still a novice to Linux. So I apologize for asking
> > > questions
> > > > for which I should already know the answer.
> > > >
> > > >
> > > > On Tue, Jul 29, 2014 at 9:05 AM, chris burke <[email protected]>
> > > wrote:
> > > >
> > > > > > Another question is how to find the link target in Linux. In
> > windows
> > > > ARGV
> > > > > is set to the link target, where in Linux it is set to the name of
> > the
> > > > > link.
> > > > >
> > > > > In both cases, ARGV is defined as the call used to start J. If you
> > want
> > > > to
> > > > > find jconsole, it should be in ~install/bin.
> > > > >
> > > > > > Also, in the properties of a file in Linux one can select the
> > > > application
> > > > > to handle the file with the "Open With" option. Is there a way to
> add
> > > > the J
> > > > > executables to that list?
> > > > >
> > > > > You should google "open with" for your distribution, e.g.
> > > > > http://community.linuxmint.com/tutorial/view/1314
> > > > >
> > > > >
> > > > > On Tue, Jul 29, 2014 at 7:23 AM, Don Guinn <[email protected]>
> > wrote:
> > > > >
> > > > > > Trying the example script in help/user/hashbang.htm and got the
> > > > following
> > > > > > error:
> > > > > >
> > > > > > don@ubuntu:~/j64-802-user/temp$ ./1.ijs
> > > > > > |domain error: script
> > > > > > |   #!/home/don/j64-    802/bin/jconsole
> > > > > > |[-0] /home/don/j64-802-user/temp/./1.ijs
> > > > > >
> > > > > > Probably works fine for 32 bit version of J as the minus sign is
> > not
> > > in
> > > > > the
> > > > > > file name.
> > > > > >
> > > > > > Another question is how to find the link target in Linux. In
> > windows
> > > > ARGV
> > > > > > is set to the link target, where in Linux it is set to the name
> of
> > > the
> > > > > > link.
> > > > > >
> > > > > > In Windows:
> > > > > >    ARGV
> > > > > >
> > > > > > ┌────────────────────────┐
> > > > > >
> > > > > > │C:\J\j64-802\bin\jqt.exe│
> > > > > >
> > > > > > └────────────────────────┘
> > > > > >
> > > > > > In Linux:
> > > > > >
> > > > > >   ARGV
> > > > > >
> > > > > > ┌───────────────────────┐
> > > > > >
> > > > > > │/home/don/Desktop/J8 Qt│
> > > > > >
> > > > > > └───────────────────────┘
> > > > > >
> > > > > > ("J8 Qt" is the name of my shortcut to start J.)
> > > > > >
> > > > > >
> > > > > > Also, in the properties of a file in Linux one can select the
> > > > application
> > > > > > to handle the file with the "Open With" option. Is there a way to
> > add
> > > > > the J
> > > > > > executables to that list?
> > > > > >
> > > ----------------------------------------------------------------------
> > > > > > For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > > >
> > ----------------------------------------------------------------------
> > > > > For information about J forums see
> > http://www.jsoftware.com/forums.htm
> > > > >
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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