sh

package module
v0.0.0-...-60e0f31 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Golang library for various shell commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(args ...string) (result []byte, err error)

command: command [-pVv] command [arg ...]

Execute a simple command or display information about commands.

Runs COMMAND with ARGS suppressing  shell function lookup, or display
information about the specified COMMANDs.  Can be used to invoke commands
on disk when a function with the same name exists.

Options:
  -p    use a default value for PATH that is guaranteed to find all of
        the standard utilities (Ignored and always true)
  -v    print a description of COMMAND similar to the `type' builtin
  -V    print a more verbose description of each COMMAND (Not implemented)

Exit Status:
Returns exit status of COMMAND, or failure if COMMAND is not found.

func Subst

func Subst(str, pattern string) (result string)

Shell variable substitution implemented: #, ##, %, %%, ^, ^^, ',', ',,', :, /

func Test

func Test(args ...string) (result bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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