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
Repeat command
-
Eliott_DUP
Re: Repeat command
Yes,
that's why I put it in my postings
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
-
Only-Alcatel
Re: Repeat command
just push the 'up' arrow on your keyboard and you can scroll back through all the entries made at the prompt......................?
Re: Repeat command
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.Only-Alcatel wrote:just push the 'up' arrow on your keyboard and you can scroll back through all the entries made at the prompt......................?
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.

