UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: rehashChapter 5
The C Shell
Next: Reference: set
 

repeat

repeat n command

Execute n instances of command.

Examples

Print three copies of memo:

% repeat 3 pr memo | lp

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


Previous: Reference: rehashUNIX in a Nutshell: System V EditionNext: Reference: set
Reference: rehashBook IndexReference: set

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System