https://github.com/hymkor/go-shellcommand
The package providing the function System like the programming language C
https://github.com/hymkor/go-shellcommand
linux unix windows
Last synced: 24 days ago
JSON representation
The package providing the function System like the programming language C
- Host: GitHub
- URL: https://github.com/hymkor/go-shellcommand
- Owner: hymkor
- Created: 2021-10-17T08:24:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-17T08:25:22.000Z (over 3 years ago)
- Last Synced: 2025-02-10T15:50:59.703Z (3 months ago)
- Topics: linux, unix, windows
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
go-shellcommand
===============go-shellcommand is the package providing the function `System` like
the one of the programming language C.```go
process, err := shellcommand.System(fmt.Sprintf(`echo "ahaha" > "%s"`, workpath))
if err != nil {
t.Fatal(err.Error())
return
}
process.Wait()
```It supports these environments.
- Windows (the shell specfied by %COMSPEC% is used)
- UNIX Like OSes (the shell specfied by $SHELL is used)