Create Infinite Loop In Bash

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel9999
    New Member
    • Jul 2019
    • 15

    Create Infinite Loop In Bash

    I want to run a command for ever in the Linux bash. Also I want to put 60 seconds between command execution.
  • SioSio
    Contributor
    • Dec 2019
    • 272

    #2
    Code:
    while :
    do
            echo hello
            sleep 60
    done

    Comment

    • edizgeorgi
      New Member
      • Oct 2019
      • 8

      #3
      You can use bash infinite loops with the while loop like

      while true; do echo "test"; sleep 60; done
      Last edited by Rabbit; Jun 11 '20, 07:19 PM. Reason: Removed external link

      Comment

      Working...