I was working on something and needed to output the string n times. I have required this even to print a line with \’-\’ or \’=\’ but this time I badly wanted it in bash. So I searched google and found this:
printf \”Amit Agarwal%.0s\” {1..5}
Explanations and other examples: http://superuser.com/questions/86340/linux-command-to-repeat-a-string-n-times
Related articles by Zemanta
- 1 reviews of Flat-Rate US Terminations (rateitall.com)
- Top Linux GUI (brighthub.com)
- A guided tour of Emacs (gnu.org)
Link to this post!