Edit shell script while it's running

前端 未结 11 1780
余生分开走
余生分开走 2020-11-27 03:18

Can you edit a shell script while it\'s running and have the changes affect the running script?

I\'m curious about the specific case of a csh script I have that batc

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 03:30

    If this is all in a single script, then no it will not work. However, if you set it up as a driver script calling sub-scripts, then you might be able to change a sub-script before it's called, or before it's called again if you're looping, and in that case I believe those changes would be reflected in the execution.

提交回复
热议问题