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

> It runs sed on itself to strip out any parts of the script that shouldn’t run, and then evals it all.

How I have done this is:

1. Put all the steps in functions.

2. Have a main function that calls all the other functions in order.

3. If given an argument, the main function skips all the functions up to that one.



Or just use make, and rerun the command on failure once clearing the error to continue where you left off.

Make is one of the most versatile pipeline tools out there.


Yup I've done that too which also gives you free parallelization and as a bonus if the rules don't have a natural product you can always touch a sentinel file in each rule so that make can just pick up where it left off.

TIMTOWTDI.




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

Search: