pipes

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssemblePipes

func AssemblePipes(cmds []*exec.Cmd, stdin io.Reader, stdout io.Writer) []*exec.Cmd

AssemblePipes Pipe stdout of each command into stdin of next

func BashRun

func BashRun(cmd string) (content string, err error)

BashRun 通过bash 执行命令

func Run

func Run(cmds []*exec.Cmd) (content string, err error)

Run 通过管道方式执行命令

func RunCmds

func RunCmds(cmds []*exec.Cmd) error

RunCmds run series of piped commands

func RunString

func RunString(s string) (string, error)

RunString Convert a shell command with a series of pipes into correspondingly piped list of *exec.Cmd If an arg has spaces, this will fail

func RunStrings

func RunStrings(tokens ...string) (string, error)

RunStrings Convert sequence of tokens into commands, using "|" as a delimiter

Types

This section is empty.

Jump to

Keyboard shortcuts

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