[ 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
chcommand 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
chcommand 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
chcommand 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 inchwith the built-inpostcommand and bring them into the foreground with the built-incontactcommand (see below for details).
chrecognizes 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
chcommand. 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-CandCTRL-Zkeys (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
stderrand exits.-V
Prints LSF release version to
stderrand exits.USAGE
The
chcommand 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.
chassigns 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,chreports its status to the standard error. If a command is not specified,chdisplays 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
postcommand. 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 thecontactcommand cannot be put back into the background.exit
Exits
chif there are no posted commands running. Typing an EOF character (usuallyCTRL-Dbut may be set otherwise, seestty(1)) forceschto exit; uncompleted posted commands are killed.SEE ALSO
lsrun(1), rsh(1), stty(1)LIMITATIONS
Currently, the
chcommand does not support script, history, nor alias.The
chprompt is always the current working host:current working directory followed by a > (right angle bracket) character. If thechsession is invoked by a shell that supports job control (such astcshorksh),CTRL-Zsuspends the wholechsession. The exit status of a command line is printed tostderrif 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.