Skip to content

Instantly share code, notes, and snippets.

@eraserhd
Created June 23, 2021 14:48
Show Gist options
  • Save eraserhd/43f7e4024febcdc5e8b9310a78ac8da9 to your computer and use it in GitHub Desktop.
Save eraserhd/43f7e4024febcdc5e8b9310a78ac8da9 to your computer and use it in GitHub Desktop.
Executable C file
//usr/bin/env cc -o "/tmp/foo.$$" "$0" || exit $?; exec "/tmp/foo.$$" "$@"
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("hello, world!\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment