Y
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
mbreese
210 days ago
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. )
link
teo_zero
210 days ago
Independently of what the interpreter can do, it's #! that doesn't pass the file to it.
link
somat
210 days ago
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.
link
(Actually, this is how the `curl install.sh | bash` anti pattern works. )