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

asadalikhan commented: while true; do your-command; sleep 60; done +0

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 Careful what you wish for. When I was first using Unix one of our programmers wrote a Bash script something like:
While 1
Do Something

He eventually overloaded the system and it crashed.

while true; do echo "Running..."; sleep 60; done
This runs forever, printing "Running..." every 60 seconds. No script file needed, just drop it in the terminal and you're good.

Be a part of the DaniWeb community

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