Skip to content

Instantly share code, notes, and snippets.

@dolmen
Last active February 6, 2018 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dolmen/fa5ea1da8bcbb47ac33b0e6dfded8449 to your computer and use it in GitHub Desktop.
Save dolmen/fa5ea1da8bcbb47ac33b0e6dfded8449 to your computer and use it in GitHub Desktop.
C source runnable from shell
///usr/bin/cc -o "${0%.c}" "$0" && exec "./${0%.c}"
// Author: Olivier Mengué
// Install: chmod u+x hello.c
#include <stdio.h>
int main()
{
puts("hello world");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment