[ 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 bych
. You can submit background jobs inch
with the built-inpost
command and bring them into the foreground with the built-incontact
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 onhostA
:
%
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
andCTRL-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 thecontact
command cannot be put back into the background.exit
Exits
ch
if there are no posted commands running. Typing an EOF character (usuallyCTRL-D
but may be set otherwise, seestty(1)
) forcesch
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 thech
session is invoked by a shell that supports job control (such astcsh
orksh
),CTRL-Z
suspends the wholech
session. The exit status of a command line is printed tostderr
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.