Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vodolaz095/repfor
REPeat FORever
https://github.com/vodolaz095/repfor
Last synced: about 4 hours ago
JSON representation
REPeat FORever
- Host: GitHub
- URL: https://github.com/vodolaz095/repfor
- Owner: vodolaz095
- License: mit
- Created: 2014-11-03T21:47:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-07T02:42:05.000Z (almost 10 years ago)
- Last Synced: 2024-06-21T13:12:20.867Z (5 months ago)
- Language: Go
- Size: 152 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
REPeat FORever
================================
Simple console utility to repeat command given forever.
I do not care about you, but for me this code saved my day.
You can say, that we can achive the same thing using cron, but cron do not allows
us to execute commands more often than once per minute.Usage
================================
`repfor [-d=3] [-o=/dev/stdout] [-e=/dev/stderr] [-l=-1] commandToRepeatForeverWithDelayProvided`Parameters
================================* d - delay in seconds, before repeating the command, default is 3 seconds
* o - where to stream stdout of command, default is /dev/stdout
* e - where to stream stderror of command, default is /dev/stderr
* l - limit the number of tries to execute command given, default is `-1` - infinitelyExamples:
================================
```shell[vodolaz095@steel ~]$ repfor 'cat /etc/issue'
[vodolaz095@steel ~]$ repfor -d=5 -o=output.log -e=error.log 'ps -e'```
Installation from source:
================================
We assume you have Linux with [Go](http://golang.org/) installed
```shell[vodolaz095@steel ~]$ go build -o ~/bin/repfor github.com/vodolaz095/repfor
[vodolaz095@steel ~]$ ./repfor -d=1 -l=3 'echo "Во имя Отца, и Сына, и Святого Духа, Аминь! Слава Тебе, Боже наш, слава Тебе."'```
License
================================
The MIT License (MIT)Copyright (c) 2013 Ostroumov Anatolij
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.