Learn more about Platform products at http://www.platform.com

[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]



ch


changes the host on which subsequent commands are to be executed

SYNOPSIS

ch [-S] [-t] [host_name]

ch [-h | -V]

DESCRIPTION

Changes the host on which subsequent commands are to be executed.

By default, if no arguments are specified, changes the current host to the home host, the host from which the ch command was issued.

By default, executes commands on the home host.

By default, shell mode support is not enabled.

By default, does not display execution time of tasks.

The ch command allows you to quickly change to a designated host with the same execution environment. A simple shell is started that delivers all subsequent commands (except built-in commands) to the designated host for execution.

When the simple shell starts, it is in the current working directory and has the same command execution environment as that of the parent shell. Every remotely dispatched command is executed with the same environment as that on the home host. The syntax of the ch command is similar to that of the Bourne shell. However, there are some important differences.

The ampersand (&) following a command line (representing a background job in the Bourne shell) is ignored by ch. You can submit background jobs in ch with the built-in post command and bring them into the foreground with the built-in contact command (see below for details).

ch recognizes a ~ (tilde) as a special path name. If a ~ (tilde) is followed by a space, tab, new line or / (slash) character, then the ~ character is translated into the user's home directory. Otherwise, the ~ is translated as the home directory of the user name given by the string following the ~ character. Pipelines, lists of commands and redirection of standard input/output are all handled by invoking /bin/sh.

The following sequence of commands illustrates the behavior of the ch command. For example, the user is currently on hostA:

% ch hostB
hostB> ch hostC
hostC> ch
hostA> ... ...

OPTIONS

-S

Starts remote tasks with shell mode support. Shell mode support is required for running interactive shells or applications which redefine the CTRL-C and CTRL-Z keys (for example, jove).

-t

Turns on the timing option. The amount of time each subsequent command takes to execute is displayed.

host_name

Executes subsequent commands on the specified host.

-h

Prints command usage to stderr and exits.

-V

Prints LSF release version to stderr and exits.

USAGE

The ch command interprets the following built-in commands:

cd [directory_name]

Changes the current working directory to the specified directory. If a directory is not specified, changes to the user's home directory by default.

ch [host_name]

Changes the current working host to the specified host. If a host is not specified, changes to the home host by default.

post [command [argument ...]]

Posts the specified command for execution in the background on the current working host. ch assigns a unique task ID to this command and displays this ID, then continues to interact with the user. However, the output of background jobs may disturb the screen. You can post multiple commands on one host or on different hosts. When a previously posted command is completed, ch reports its status to the standard error. If a command is not specified, ch displays all currently running background commands.

contact task_ID

Brings a previously posted background command into the foreground. task_ID is the ID returned by the post command. Standard input is now passed to this foreground command. You cannot put an active foreground job into the background. A command that has been brought into the foreground with the contact command cannot be put back into the background.

exit

Exits ch if there are no posted commands running. Typing an EOF character (usually CTRL-D but may be set otherwise, see stty(1)) forces ch to exit; uncompleted posted commands are killed.

SEE ALSO

lsrun(1), rsh(1), stty(1)

LIMITATIONS

Currently, the ch command does not support script, history, nor alias.

The ch prompt is always the current working host:current working directory followed by a > (right angle bracket) character. If the ch session is invoked by a shell that supports job control (such as tcsh or ksh), CTRL-Z suspends the whole ch session. The exit status of a command line is printed to stderr if the status is non-zero.

[ Top ]


[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]


      Date Modified: February 24, 2004
Platform Computing: www.platform.com

Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Copyright © 1994-2004 Platform Computing Corporation. All rights reserved.