How can I repeat the character – n times in shell? I have read and tried this, but this does not work for -. It throws error invalid option. Below is the exact command that I used: Original posted line: printf ‘-%0.s’ {1..100} I also tried escaping – by putting a but in that case it repeats – n
Tag: repeat
How to Run Multiple Time Same Code in Bash
How can i run multiple times this same code? For example 12 times? All the code belove must be replicated N times something like But it does not work for multiple lines of command. Any issue? Answer Using a while loop and a counter: