Name

Shell — The JXTA Shell command interpreter

Synopsis

Shell [-f filename] [-s] 

Description

The JXTA Shell provides an interactive environment for the JXTA platform.

A new shell can be forked within a shell. The Shell -s command starts a new shell with a new shell window. The shell can also read a command script file with the Shell -f myfile command.

Every shell command is in the form cmd ;..; cmd. The “;” is used as a command separator so that multiple commands can be entered on one line. Pipelines can be created by combining the pipe stdout of a command into the pipe stdin of another command using the pipe (|) operator. For example, in the following command:

JXTA>cat env1 | more

the output of the cat command is sent to the stdin of the more command. An arbitrary number of commands can be pipelined together within a single shell command.

The = operator can be used to assign the value of a command output to an environment variable. For example:

JXTA> myadv = mkadv -p

This command creates a new pipe advertisement and stores it in the myadv environment variable.

Options

-f filename

Executes the script file in the shell

-s

Forks a new shell in a new window

Example

JXTA>Shell -f /home/tra/batch

This command executes the commands that are stored in the shell script /home/tra/myfile in the current shell.

Environment

The Java implementation of the shell uses two system properties to configure its graphics:

SHELLNOWINDOW

If true, then no AWT window is created; the shell ...

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.