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

Sure, but executing cmd2 even if cmd1 fails is done with ;



Using ; will not work if you ran set -e before (eg.: if you're using it in a script). Perhaps more importantly, cmd1; cmd2 & will not work either, you'll need a subshell. So, you need at least: ( set +e; cmd1 ; cmd2 ) &. And there are probably other caveats. And we haven't even got to the output redirection yet.




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

Search: