0

Is there a way to comment out a multi-line bash command, without commenting out each line with a preceding #? when a single command is composed of several lines continued via a slash that is.

2
  • 1
    Is this just to save some typing of #'s, or why? Some text editors / IDE's (Geany) can comment & uncomment lots of lines at once
    – Xen2050
    Jan 18, 2018 at 13:32
  • Yes, it's also for that, if your IDE doesn't support it, for sane debug workflows
    – matanox
    Jan 21, 2018 at 19:14

2 Answers 2

2

I put those lines inside a function that is never called.

2

see Michael Rusch's answer here

if false; then

...

fi

or see further this question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .