Thanks Joey! I'd been looking in the wrong place.
Ronan
On 16/11/2006 21:24, "Joey K Tuttle" <[EMAIL PROTECTED]> wrote:
> At 19:20 +0000 2006/11/16, Ronan Reilly wrote:
>> Hi All,
>>
>> I'm running a distributed application on a cluster using J and I need a verb
>> that returns the IP (or hostname) of the node on which the jconsole is
>> running.
>>
>> Thanks for any help.
>>
>
> Assuming you are in a _NIX environment, 2!:0 (Host) is
> the key - e.g. I would use:
>
> host 'echo $HOSTNAME'
> focus
>
>
> where host is defined as:
>
> host
> [: 2!:0 '('"_ , ] , ' || true)'"_
>
>
> You might choose to make a simpler verb with just 2!:0
> but the extra stuff in the above definition makes it
> more useful in that it always returns a result, even if
> the expression passed to the host has no result.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Professor Ronan Reilly
Head of Department
Department of Computer Science
NUI Maynooth
Maynooth
Co. Kildare
IRELAND
t: +353-1-7083847
e: [EMAIL PROTECTED]
w: http://www.cs.nuim.ie; http://cortex.cs.nuim.ie
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm