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

You can over-rely on "set -e" however:

  #!/usr/bin/env bash
  set -e
  fail() { false ; echo hello; }
  if ! fail; then :; fi
That outputs "hello" and exits with 0.


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

Search: