buildkite/shellwords

GitHub: buildkite/shellwords

Stars: 19 | Forks: 3

# Shellwords A golang library for splitting command-line strings into words like a Posix or Windows shell would. ## Installation go get -u github.com/buildkite/shellwords ## Usage package main import ( "github.com/buildkite/shellwords" "fmt" ) func main() { words := shellwords.Split(`/usr/bin/bash -e -c "llamas are the \"best\" && echo 'alpacas'"`) for _, word := range words { fmt.Println(word) } } // Outputs: // /usr/bin/bash // -e // -c // llamas are the "best" && echo 'alpacas' ## Alternatives Other alternatives are https://github.com/flynn-archive/go-shlex and https://github.com/kballard/go-shellquote, of which the latter is probably closest in spirit to this library. ## License Licensed under MIT license, in `LICENSE`.
标签:EVTX分析