How do you repeat a bash command?

Duyên Trương

New member
How do you repeat a bash command?
Answer
Basically, you get
the “yes” command to
repeat the string “ls” N times; while “head -n5” terminated the loop at 5 repeats. The final pipe sends the command to the shell of your choice. Incidentally csh -like shells have a built-in repeat command. You could use that to execute your command in a bash sub-shell!
 

Tìm kiếm

Back
Top