Skip to content

Comments

Nuno Nogueira edited this page Dec 15, 2022 · 6 revisions
  • We use the hash # character in the beginning of the code line. Example:

    # Print the following text
    echo 'The variable is xpto'
    
  • To comment several code lines we use : <<'COMMENT' in the beginning and only COMMENT or other word/identification type in the end of what we want to comment. Examples:

    : <<'COMMENT'
    All
    these
    lines
    of
    code
    are
    commented
    COMMENT
    
    : <<'/////'
    All
    these
    lines
    of
    code
    are
    commented
    too
    /////
    

    -> DOWNLOAD script file comments.sh