Emacs workflow to edit Bash scripts while they run

后端 未结 4 779
夕颜
夕颜 2020-12-06 18:15

Bash can give unexpected results if one edits a script while the script is running. But it would often be very convenient to be able to edit a temporary copy of a script tha

4条回答
  •  孤街浪徒
    2020-12-06 18:49

    Just adding this solution as an easy and clean way to protect running BASH scripts from being changed:

    #! /bin/bash
    {
    your_code;
    exit;
    }
    

提交回复
热议问题