Block Comments in a Shell Script

后端 未结 12 1206
小鲜肉
小鲜肉 2020-12-02 03:36

Is there a simple way to comment out a block of code in a shell script?

12条回答
  •  一生所求
    2020-12-02 04:07

    Another mode is: If your editor HAS NO BLOCK comment option,

    1. Open a second instance of the editor (for example File=>New File...)
    2. From THE PREVIOUS file you are working on, select ONLY THE PART YOU WANT COMMENT
    3. Copy and paste it in the window of the new temporary file...
    4. Open the Edit menu, select REPLACE and input as string to be replaced '\n'
    5. input as replace string: '\n#'
    6. press the button 'replace ALL'

    DONE

    it WORKS with ANY editor

提交回复
热议问题