SHell

Invoke a system dependent shell

SHell

Shortest form: sh.

Run a command in the operating-system shell, or start an interactive shell.

  • With arguments: they are joined with spaces (up to 8191 characters) and run by /bin/sh. The diag shell has already split the line at ; and removed quotes, so quote shell syntax for the diag shell first.

  • Without arguments: start $SHELL (default /bin/sh) interactively; exit it to return.

The command runs as root inside the syncd container. The diag shell waits until it finishes, and the command’s exit status is ignored.

At the drivshell> prompt, the exact line sh and any line starting with she are refused as blocked, so shell … does not work there. But sh <command> does, because sh is the shortest form of SHell.

Unvalidated

drivshell> sh uptime

Built-in help

Parameters: <shell commands>
    Execute platform dependent shell commands. If shell commands are not
    specified, invoke a platform dependent shell. This shell exits when
    the shell exits

Further reading

SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), BCM_SDK命令, BCMShell使用说明简介 - 二层交换芯片调试接口.