Garret Wilson Garret Wilson - 11 months ago 91
Linux Question

Does Bash ignore # after command?

I know that Bash ignores the

character at the beginning of shell script lines. But in documentation I'd like to add them at the end of lines for documentation:

ls -l #long directory listing

Just in case somebody copies and pastes the literal information I've written, will Bash ignore everything after the
character? For every command? (It seems to work in informal testing, but a reference to some definitive answer would be nice.) Thanks!

Answer Source

Yes you can add a comment using the "#" at the end of a command: Please refer to the following link