Besides having a terminal open, we need to remember a few concepts:
- Recursive functions combined with a prompt (for example, the read command) can result in a script that loops based on user input
- Looping constructs such as for, while, and until can be executed in such a way that a condition is never met and cannot exit
Therefore, a loop or something that causes a loop will force a program to run for an indefinite period of time until an exit event occurs.
In many programming languages, a program will be executed through the concept of a main function. Within this main function, often programmers create what's called a run loop, which allows the program to run forever (even if it is doing nothing).
Using the recursive method, ...