: is just an alias for true , and true ignores its arguments:
# Does nothing: true foo bar etc hello
This is not a comment and should never be used as a comment because all its arguments are still parsed and evaluated:
: This "comment" actually executes this command: $(touch foo) ls -l foo
or like here, where StackOverflow syntax highlighting determines that the command in the middle is actually just text, even if the person is not executing:
: The command below won't run: echo "Hello World" : because the surrounding "comments" each contain a ' characters
that other guy
source share