LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

do

command repetition utility

TLDR

Execute command repeatedly
$ do [command] [args]
copy
Execute with count
$ do -n [5] [command]
copy
Execute with interval
$ do -i [2] [command]
copy
Execute until success
$ do -s [command]
copy

SYNOPSIS

do [options] command [args...]

DESCRIPTION

do is a simple utility for repeatedly executing commands. It provides options for controlling iteration count, timing, and termination conditions based on command exit status.The tool is useful for polling operations, retrying failed commands, and automated testing scenarios. It offers a simpler interface than while loops for common repetition patterns.Various implementations of 'do' exist with different feature sets. Behavior may vary depending on which version is installed.

PARAMETERS

COMMAND

Command to execute.
ARGS
Arguments to pass to command.
-n COUNT
Number of iterations.
-i SECONDS
Interval between executions.
-s
Stop on success (zero exit).
-f
Stop on failure (non-zero exit).
--help
Display help information.

INSTALL

yay -S do
copy

CAVEATS

Name may conflict with shell builtins or other utilities. Different implementations have different options. May need escaping for shell-interpreted arguments.

HISTORY

Multiple utilities named 'do' exist across different systems and package repositories. The concept of command repetition is fundamental to shell scripting, with various tools providing convenient interfaces.

SEE ALSO

watch(1), while(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid