I\'m learning to write a TCL (expect) scripts and I notice that some examples show to use spawn, while others show the command exec. I tried googling, but can\'t find what is th
A simpler way of answering the question is rephrasing it to ask when you should use exec vs spawn. In short, use spawn for interactive commands and exec for non-interactive commands.