Hacker News new | ask | show | jobs
by teo_zero 210 days ago
Wait... your interpreter reads from stdin. Shouldn't it read its first arg, instead?
2 comments

IIRC interpreters can also read their programs from stdin. Try piping a script to bash and see if it works.

(Actually, this is how the `curl install.sh | bash` anti pattern works. )

Independently of what the interpreter can do, it's #! that doesn't pass the file to it.
I think that was what I was trying to figure out, how the program was passed. but OpenBSD does not do nested interpreters, it looks like if I had tried Linux it would have worked.