Discussion:
Multi line comment
(too old to reply)
Jerry
2018-09-24 14:15:21 UTC
Permalink
I am sort of new to using Bash. Bash apparently does not have a built in
multi line comment feature like in C. I Googled and discovered quite a few
methods. I was wondering what is the preferred method by bash gurus.
--
Jerry
Greg Wooledge
2018-09-24 14:20:21 UTC
Permalink
Post by Jerry
I am sort of new to using Bash. Bash apparently does not have a built in
multi line comment feature like in C. I Googled and discovered quite a few
methods. I was wondering what is the preferred method by bash gurus.
The preferred method is to put # on each line.

# This is a comment.
# It spans several lines.
# Because I had a lot to say.

Really, don't try to be "clever". This is a shell script. Keep it simple.
Jesse Hathaway
2018-09-24 14:39:06 UTC
Permalink
Post by Greg Wooledge
The preferred method is to put # on each line.
# This is a comment.
# It spans several lines.
# Because I had a lot to say.
Really, don't try to be "clever". This is a shell script. Keep it simple.
I agree with Greg, a plugin like
https://github.com/tomtom/tcomment_vim for vim can help
make the task less arduous.
Post by Greg Wooledge
Post by Jerry
I am sort of new to using Bash. Bash apparently does not have a built in
multi line comment feature like in C. I Googled and discovered quite a few
methods. I was wondering what is the preferred method by bash gurus.
The preferred method is to put # on each line.
# This is a comment.
# It spans several lines.
# Because I had a lot to say.
Really, don't try to be "clever". This is a shell script. Keep it simple.
Jerry
2018-09-24 14:59:31 UTC
Permalink
Post by Greg Wooledge
Post by Jerry
I am sort of new to using Bash. Bash apparently does not have a built in
multi line comment feature like in C. I Googled and discovered quite a few
methods. I was wondering what is the preferred method by bash gurus.
The preferred method is to put # on each line.
# This is a comment.
# It spans several lines.
# Because I had a lot to say.
Really, don't try to be "clever". This is a shell script. Keep it simple.
I kind of figured that I was over thinking it.
--
Jerry
Loading...