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

Just as an alternative suggestion, consider using a "down file" instead if you can and letting the code gracefully end. Plus you get to write "touch down" and do an end zone dance.


I think you need to be a little more specific about what the "down file" is for, especially since you can't for google it.


Apologies. It's for ending execution prematurely. Here's an example:

while true; do

  echo hello

  test -f down && exit
done

Now to stop early you execute "touch down".




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

Search: