I want to run a command for ever in the Linux bash. Also I want to put 60 seconds between command execution.

Recommended Answers

All 3 Replies

For me that's a script with three lines.
Echo something.
do something
sleep 60
goto top

This is psuedo code so you need to craft it for the shell you use.

You can use bash infinite loops with the while loop like

while true; do echo "test"; sleep 60; done

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.