This StackOverflow question mentions a unix command called 'repeat'. It sounds like it does exactly what I want. From reading the question and answers, I think the user is on Mac OSX.
However that command is not installed by default on Ubuntu, and I can't find the package to install to get it. What should I install?
Best Answer
I can't find this command on Ubuntu. It doesn't seem to exist. I even find it very weird that the post on StackOverflow says it's a builtin command when I can't find it on Ubuntu.
Edit: Like Matt noted, it is a builtin csh command. The following are tips to do quite the same with bash.
If what you want is to repeat a command n times, you can do that with a loop though:
For example, to print 100 times "It works", use:
If you want to have a
repeat
function, you could add something like this to your~/.bashrc
:Source your
~/.bashrc
again with. ~/.bashrc
and you can call it: