The script command not only makes a record of what commands you run but also allows you to save the output generated so that you can examine it later or easily turn your command sequences into scripts ...
Looping forever is easy if you know what commands you want to run repeatedly and the conditions under which you want them to stop running. There are several ways to loop “forever” on Linux commands.