What is the difference between spawn and exec?

后端 未结 4 1478
-上瘾入骨i
-上瘾入骨i 2021-02-04 01:50

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

4条回答
  •  醉梦人生
    2021-02-04 02:17

    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.

提交回复
热议问题