shell

Creates a subprocess to run a shell or other program

Applicability

Product

Command type

VersionVault

cleartool subcommand

MultiSite

multitool subcommand

VersionVault Remote Client

rcleartool subcommand

Platform

UNIX®

Linux®

Windows®

Synopsis

sh·ell  |   !  [ command [ arg ... ] ]

Description

The shell command creates a subshell.

UNIX® and Linux® — view context

The subshell is created with the same view context as the current process. If the current process is set to one view, but the working directory view is different, shell uses the working directory view. (For more information, see the pwv reference page.)

The shell command is intended for use in cleartool and multitool interactive mode. If you are using single-command mode, there is no need for this command.

Restrictions

None.

Options and arguments

Program to run in subprocess

Default
Runs the shell program indicated by your SHELL (UNIX® and Linux®) or ComSpec (Windows®) environment variable (or /bin/sh (UNIX® and Linux®) or cmd.exe (Windows®), if your environment does not include SHELL/ComSpec). The shell runs interactively until you exit from it.
Note: On Windows®, changing the ComSpec variable to a value other than cmd.exe may have undesirable side effects elsewhere in your work environment. To avoid this problem, you can invoke the alternative shell explicitly from cmd.exe, after executing shell.
command [ arg ... ]
Runs a noninteractive shell which, in turn, invokes the program command, (and, optionally, passes it one or more arguments). The subshell exits immediately after executing command.

Examples

UNIX® and Linux®

  • Create a subshell that is set to the same view as the cleartool process.

    cleartool> shell

  • Create a subshell, and run a command within it.

    % ! head -2 /etc/passwd
    sysadm:*:0:0:System V Administration:/usr/admin:/bin/sh
    diag:*:0:996:Hardware Diagnostics:/usr/diags:/bin/csh

Windows®

  • Create an interactive subshell, and then run a dir command in that shell.

    cleartool shell
    > dir *.c
      ...
    >
    exit

  • Create an noninteractive subshell that runs a dir command.

    cleartool shell dir *.c
      ...