https://github.com/buildertools/echoerr
Sometimes you just need to print something to STDOUT and exit with a specific code... w/o shell assist.
https://github.com/buildertools/echoerr
Last synced: 6 months ago
JSON representation
Sometimes you just need to print something to STDOUT and exit with a specific code... w/o shell assist.
- Host: GitHub
- URL: https://github.com/buildertools/echoerr
- Owner: buildertools
- License: apache-2.0
- Created: 2017-08-16T15:21:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T15:45:03.000Z (almost 9 years ago)
- Last Synced: 2024-06-20T17:41:52.677Z (about 2 years ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# echoerr
Print a message to STDOUT and exit with the specified code.
USAGE:
echoerr [exitcode]
### Examples
$ echoerr 1 Pretty standard stuff
Pretty standard stuff
$ echo $?
1
$ echoerr 2 Something more interesting
Something more interesting
$ echo $?
2
$ echoerr 128 "Standard shell stuff" even vars: $PATH
Standard shell stuff even vars: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
$ echo $?
128
$ echoerr No exit code
No exit code
$ echo $?
1
### Installation
For gophers:
go get github.com/buildertools/echoerr
For Darwin (OSX):
curl -L -o ~/bin/echoerr https://github.com/buildertools/echoerr/releases/download/v1.0/echoerr-darwin64
chmod a+x ~/bin/echoerr
### LICENSE
Released under [AL2](LICENSE) and copyright held by "Jeff Nickoloff."