Skip to main content

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.

Release files for shrep 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shrep 0.1
File Size Uploaded
shrep-0.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shrep 0.1
File Interpreter ABI Platform
shrep-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / shrep-0.1.tar.gz

Download URL shrep-0.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6feb106c958eeaa8c85da40d68fd5fb60cec3edcb8d189d22fe01d96f0cbe126
BLAKE2b-256 checksum
How to use checksums
b312c40e2482d1dbc45e7dc327f3d4854191fa6fb464a7a5800ac45ae62a0c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / shrep-0.1-py3-none-any.whl

Download URL shrep-0.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b3c47adf736159f43b1fe44941654e347b808f8f88136868fa51a9c8e53ab8b
BLAKE2b-256 checksum
How to use checksums
3a4dcbe323b0fb2073a60b9f5bbf03d58282a321646c3e5d134720cfc1d177a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page