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

Here's a workaround for modifying scripts while they are running; it works because function bodies are read and parsed entirely when they are defined.

  main() {
    script goes here
    exit
  }
  main "$@"


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: