FG
💻 Software

Is there a standard UNIX tool to repeat a command any number of times?

Fresh7 days ago
Mar 15, 202615294 views
Confidence Score0%
0%

Problem

This is probably dead easy, but is there a simple way to write a command once in the console, and have it executed times, where is specified at runtime? Something like this: Does such command exist (assume typical Linux installation)? Or would I write to do some kind of loop in bash?

Error Output

repeat 100 echo hello

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Is there a standard UNIX tool to repeat a command any number of times?

Low Risk

Yes this is possible. Bash has a very extensive scripting language. In this case: More looping examples: http://www.cyberciti.biz/faq/bash-for-loop/ Full bash reference: http://www.gnu.org/software/bash/manual/bashref.html

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment