Code Monkey home page Code Monkey logo

redo's Introduction

Redo: A Command-Line Utility for Repeating Executions

Introduction

Redo is a lightweight command-line tool designed to facilitate repeated execution of a specific command according to given criteria. It supports setting a timeout for command executions and specifying the number of repetitions. Moreover, it includes an option to keep repeating a command until it succeeds.

Features

  • -e, --timeout: Sets a timeout for each command execution. Supports time strings with units (s, m, or h). For example, -e 10s represents a 10-second timeout.
  • -r: Specifies how many times the command should be repeated.
  • -u: Continuously repeats the command until it succeeds (exits with code 0).

Usage Example

redo -r 5 -e 10s ping google.com

This command would execute ping google.com five times, with a maximum execution time of 10 seconds per attempt.

redo "ps aux | grep redo"

This will execute the command 'ps aux | grep redo'

Installation

git clone https://github.com/yourusername/redo.git
cd redo
make
sudo make install

redo's People

Contributors

mofantor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.