command

package
v0.0.0-...-5423190 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCmd

func RunCmd(name string, arg ...string)

RunCmd 只执行命令,不获取结果

func RunCmdForPipe

func RunCmdForPipe()

RunCmdForPipe 使用管道执行 <==> grep ERROR /var/log/messages | wc -l

func RunCmdOut

func RunCmdOut(name string, arg ...string)

RunCmdOut 执行命令,并获取结果,不区分stdout和stderr

func RunCmdStd

func RunCmdStd(name string, arg ...string)

RunCmdStd 执行命令,获取结果区分stdout和stderr

func RunCommandWithCtx

func RunCommandWithCtx(ctx context.Context, name string, arg ...string)

RunCommandWithCtx 带context

Types

This section is empty.

Jump to

Keyboard shortcuts

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