Hacker News new | past | comments | ask | show | jobs | submit login

Fiy, heredocs also have a variant that strips all leading tab characters. Quoting from `man 1 bash`:

  If the redirection operator is <<-, then all leading   
  tab characters are stripped  from  input  lines  and  
  the line containing delimiter.  This allows here-
  documents within shell scripts to be indented in a  
  natural fashion.



There’s also a variant, where you single quote the marker, that won’t expand variables:

    cat <<‘EOF’
    This will not be ${expanded}
    EOF




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

Search: