shell

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: BSD-2-Clause Imports: 7 Imported by: 0

README

The shell package provides a single module:

Shell

This module executes a shell command on the DUT agent.

ARGUMENTS:
	[command-string]

The shell is executed with the -c flag and the the first argument to the module is passed as the command-string.
So make sure to quote the command-string if it contains spaces or special characters. E.g.: "ls -l /tmp"
The shell module is non-interactive and does not support stdin.

See shell-example-cfg.yml for examples.

Configuration Options

Option Value Description
path string Path is th path to the shell executable on the dutagent. Defaults to the system default shell
quiet bool Suppress forwarding stout, but not sterr

Documentation

Overview

Package shell provides a dutagent module that executes shell commands.

Index

Constants

View Source
const DefaultShellPath = "/bin/sh"

DefaultShellPath is the default path to the shell executable on the dutagent.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shell

type Shell struct {
	Path  string // Path is th path to the shell executable on the dutagent. If unset, [DefaultShellPath] is used.
	Quiet bool   // Quiet suppresses stdout from the shell command, stderr will be forwarded regardless.
}

Shell is a module that executes commands on the dutagent. It is non-interactive and does not support stdin. The shell command is executed with the -c flag and the command to execute as an argument.

func (*Shell) Deinit

func (s *Shell) Deinit() error

func (*Shell) Help

func (s *Shell) Help() string

func (*Shell) Init

func (s *Shell) Init() error

func (*Shell) Run

func (s *Shell) Run(_ context.Context, sesh module.Session, args ...string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL