Page 2 of 2
Re: Repeat command
Posted: 14 Oct 2009 04:48
by Gedeon
Be carefull whith loop commands, if you don't have pause in this sequence, the CPU time may be used at 100%.
A loop like : while true; do :; done ==> 100% and very difficult to stop this by ctrl-c.
You must use pause with sleep N (N can be < 1 like 0.2).
G
Re: Repeat command
Posted: 14 Oct 2009 13:39
by Eliott_DUP
Yes,
that's why I put it in my postings
Eliott wrote:while : ; do
command
sleep 5
done
or
watch -n -d1
or
at
or
cfgCron
Eliott wrote:do ?
for((i=0;$i<=5;i=$(($i+1))))do config 0;usleep 500000; done
Re: Repeat command
Posted: 12 Apr 2011 19:16
by Only-Alcatel
just push the 'up' arrow on your keyboard and you can scroll back through all the entries made at the prompt......................?
Re: Repeat command
Posted: 14 Apr 2011 04:06
by Eliott
Only-Alcatel wrote:just push the 'up' arrow on your keyboard and you can scroll back through all the entries made at the prompt......................?
This will not repeat the command continously. It will just allow you to get a list of the last commands to execute it again - but manually.
You can also use the history command and execute a specific command using ! followed by the number.
And Ctrl+r can search a part of the last entered commands.