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

&& means there's a sequence. So the second statement will only execute conditioned on the first sequence. So...

  > thisFunctionFails && echo "Hello world" && echo "I SAID $_"
  
  > thisFunctionSucceeds && echo "Hello world" && echo "I SAID $_"
  Hello World
  I SAID Hello World
The left function has to get evaluated before the next function. So it is still related to the previous command.


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

Search: