CMDSEQ(1)

NAME
cmdseq - Execute interleaved sequences of commands

SYNOPSIS
cmdseq [-d count_dir] count_1 cmd_1 [... count_n cmd_n]

DESCRIPTION
cmdseq executes interleaved sequences of commands. For a given sequence of counts and commands, each execution of cmdseq executes one of the commands, cycling through the sequence and wrapping back to the beginning when it is complete.

The options are as follows:

-d count_dir
    specifies where cmdseq stores its cookie file. Defaults to /tmp/

count cmd
    Specifies that the positive non-zero integer count iterations of cmd should be executed before moving to the next command in the sequence.

cmdseq exits with the exit code of whichever cmd it ran.

EXAMPLES

    $ cmdseq 2 "echo cmd1" 1 "echo cmd2"
    cmd1
    $ cmdseq 2 "echo cmd1" 1 "echo cmd2"
    cmd1
    $ cmdseq 2 "echo cmd1" 1 "echo cmd2"
    cmd2
    $ cmdseq 2 "echo cmd1" 1 "echo cmd2"
    cmd1

AUTHORS
-nosplit cmdseq was written by Laurence Tratt <https://tratt.net/laurie/>