Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/l-with/wait-until
https://github.com/l-with/wait-until
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/l-with/wait-until
- Owner: l-with
- Created: 2023-03-16T13:09:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-22T09:08:04.000Z (11 months ago)
- Last Synced: 2024-04-17T21:18:57.260Z (7 months ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wait until
script to retry a command until the return code is 0, print usage with `wait_until -h`
The parameter `--check` is only for structuring, the following commands are equivalent:
```bash
wait_until --delay 1 --retries 3 --check 'grep text | wc -l | grep 1' --verbose 'cat wait_until'
``````bash
wait_until --delay 1 --retries 3 --verbose 'cat wait_until | grep text | wc -l | grep 1'
```## wait until with curl
```bash
wait_until --delay 10 --retries 42 --check 'grep 402' 'curl --no-progress-meter --connect-timeout 10 --retry 42 --retry-delay 10 --output /dev/null/ --write-out "%{http_code}" http://example.com/api/endpoint'wait_until -v -d 1 -r 5 -c 'grep -e 100 -e 404' 'curl --silent --no-progress-meter --connect-timeout 5 --retry 5 --retry-delay 1 --write-out "%{http_code}" http://example.com/api/endpoint'
```