Name
repeat
Synopsis
repeat n command
Execute n instances of command.
Examples
Generate a test file for a program by saving 25 copies of /usr/dict/words in a file:
% repeat 25 cat /usr/dict/words > test_file
Read 10 lines from the terminal and store in item_list:
% repeat 10 line > item_list
Append 50 boilerplate files to report:
% repeat 50 cat template >> report
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.