Skip to main content

command-line tool to run a command repeatedly

Project description

shrep lets you run a shell command repeatedly, or until it fails. It’s intended for diagnosing intermittent failures – e.g. say you have a C program that seg faults once every hundred runs or so, and you need to reproduce it to fix it:

shrep -n 100 ./myprog

shrep can also run your program until it fails rather than a fixed number of repetitions. It can capture stdout and stderr to avoid cluttering your terminal. It can run child processes in parallel. See the man page for the full story:

groff -man -Tascii shrep.1 | less

Installation

shrep is currently a single-file Python script. The easiest way to install it is:

pip install --user shrep

That will put the executable in ~/.local/bin.

It also installs a man page, which you can read with

MANPATH=~/.local/share/man man shrep

(At least, that works for me on Ubuntu.)

Contributing

Find a bug? Want to implement a feature? Send me email! If a lot of people like it, I’ll put it on github or something.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shrep-0.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

shrep-0.1-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page