A
A
Andrey Belyaev2020-11-08 23:18:10
bash
Andrey Belyaev, 2020-11-08 23:18:10

How to loop command in linux console

how to loop a command in the linux console and execute it a certain number of times when it completes

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AVKor, 2020-11-08
@AVKor

#!/usr/bin/env bash

for i in {1..10}
do
 # whatever
done

A
Alexey Kharchenko, 2020-11-09
@AVX

In one line:
for i in {1..10}; do echo $i; done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question