The .bat equivalent is:
:one
<<run program>>
goto :two
:two
<<run program>>
goto :one
end
Can a .sh do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s actually no exact replacement. In
bashprogramming, you can define functions, so you might do something likeAlthough eventually that’ll run out of stack space; hopefully there’s some circumstances under which you’ll include code to stop the recursion. I realize this is just a straw man example, but
bashwould let you use other forms of loops here which would work better; for example: