The Linux expect command takes script writing to an entirely new level. Instead of automating processes, it automates running and responding to other scripts. In other words, you can write a script ...
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 ...
Skip one-click backup apps. This rsync script gives you full control over what gets saved and when, plus logs and a few hard-won lessons.