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

Furthermore I would say this is actually a "feature", as some scripts might be too large to fit into limited memory, and also reading-and-executing one step at a time allows one to write "dynamic" scripts that are generated as they are executed.

Although I haven't written such "dynamic" scripts (yet), I'm sure a few exist that based on `expect` and `bash` work in a "feedback-loop" manner.



If you want to use a 'dynamic' script, why not pipe from stdin instead?


Yes, you are right, pipes are mandatory here.

When I was referring to a "dynamic" script I didn't mean "just append to a file", but instead I was referring to the fact that `bash` doesn't first try to load the whole script, parse and then execute it, but instead it "streams" through the script.




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

Search: