Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can put comments in Bash scripts, including in multi-line pipelines

  echo x |\
    # Comment here
    cat | # Or like this
    cat
An interactive shell with the option interactive_comments set (the default) ignores these comments, which is useful if you wish to copy+paste+execute bits of scripts.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: