diff options
Diffstat (limited to 'src/blog/2024-09-20-c-scripting/script.c')
| -rwxr-xr-x | src/blog/2024-09-20-c-scripting/script.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/blog/2024-09-20-c-scripting/script.c b/src/blog/2024-09-20-c-scripting/script.c new file mode 100755 index 0000000..de57959 --- /dev/null +++ b/src/blog/2024-09-20-c-scripting/script.c | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #if 0 | ||
| 2 | |||
| 3 | bin="$(mktemp)" | ||
| 4 | cc -o "$bin" "$(realpath $0)" | ||
| 5 | "$bin" | ||
| 6 | |||
| 7 | exit 0 | ||
| 8 | #endif | ||
| 9 | |||
| 10 | #include <stdio.h> | ||
| 11 | |||
| 12 | int main() { | ||
| 13 | printf("Hello, world!\n"); | ||
| 14 | return 0; | ||
| 15 | } | ||
