.\" Copyright (C), 2024 Tristan Riehs .\" You may distribute this file under the terms of the GNU Free .\" Documentation License. .TH repeat 1 "2024-02-03" "repeat @VERSION@" .SH NAME repeat \- repeat a shell command .SH SYNOPSIS .B rpt [ .B \-n .I COUNT ] [ .B \-f | .B \-u ] [ .B \-p ] .I COMMAND .B rpt [ .B \-h | .B \-v ] .SH DESCRIPTION .B rpt allows you to easily repeat a command a certain number of times. The command is repeated sequentially. If stdin is not empty, it is given to .IR COMMAND . .SH OPTIONS .TP .B \-h Display help and exit. .PP .TP .B \-v Display version and exit. .PP .TP .B \-n .I COUNT Repeat .I COMMAND COUNT times. If this flag is not given, .I COMMAND is invoked once. .PP .TP .B \-f By default, .B rpt stops whenever .I COMMAND fails. If the .B force flag is set, .B rpt ignores errors. Icompatible with the .B \-u flag. .PP .TP .B \-u Repeat .I COMMAND until it fails. Incompatible with the .B \-f flag. Giving this option is equivalent to specifying .B \-n .IR LONG_MAX , where .I LONG_MAX is the maximum value a C99 .B long int can hold, provided as a macro by .BR limits.h (0p). Therefore, the .B \-u and the .B \-n option suppress each other behavior. .PP .SH "EXIT STATUS" When a subprocess exit abnormally and the .B force flag is not given, .B rpt exits with the same status as the subprocess. 1. Invalid option. 2. Error while reading .IR COUNT . This includes the case where the .B count flag is given, but .I COUNT is missing. 3. .I COMMAND not provided. 4. Other error. .SH FILES None. .SH "SEE ALSO" .BR seq (1) .BR test (1) .SH BUGS .SH AUTHOR Tristan Riehs