3 ms·
I was going to try to figure out how to turn this into an even-cleverer one-liner which did not create any files at all, using something like: $ echo -e "#incl
by BrandonM 19y ago
I was going to try to figure out how to turn this into an even-cleverer one-liner which did not create any files at all, using something like:
$ echo -e "#include <stdio.h>\n#include <time.h>\nmain(){printf(\"%d\\\n\",sizeof(time_t));}" |gcc -x c -o >('some command which runs a file received on standard input') -
Unfortunately, after about 20 minutes of searching, I've found no Unix utility like that. That seems somewhat strange since it is possible to utilize pipes in so many ways. Am I missing something?
Oh, by the way, I got 8 as well.
- Tuna-Fish 19y agoYes. There is an obvious lack for a program that takes an elf binary in it's input and runs it. I've spent a while trying to find it too.
- BrandonM 19y agoIt shouldn't even need to be an elf binary. It should be able to be any file which could serve as a command in unix, which would include things like she-bang-interpreted executables and alternative binary formats recognized by your kernel. Shouldn't there be some kind of hook into whatever e.g. bash uses? It doesn't seem like such a utility should be hard to write.