Commandline program that repeats a string by a given amount. Supports a separator string, reversing the input string and can be used in pipes.
This is a clone of the ANSI-C implementation called repeat
created by marcotrosi.
cargo install --path .
$ rpt 3 foo
foofoofoo
$ echo 'foo' | rpt 3
foofoofoo
$ rpt -s ',' 3 foo
foo,foo,foo
$ rpt -- -2 foo
oofoof
$ rpt -e -s '\t' 3 foo
foo foo foo
rpt [-v] [-h] [-n] [-e] [-s <sep>] repetitions [string]
-s <sep> optional separator string
-n do not output the trailing newline
-e interpret some few escape sequences (\\,\t,\n)
-v print version info
-h print help text