example: avoid multi-dimensional array
[c2run.git] / README.md
blob3ea230ea673015bea4b17b3901f0719e8315af73
1 # cscript
2 #### by [Jason A. Donenfeld](mailto:Jason@zx2c4.com)
4 `cscript` executes C code from stdin using any variety of compiler arguments. It can be used from the command line:
6 ```
7 $ echo 'main(){puts("hello world");}' | cscript
8 ```
10 Or it can be used at the top of scripts:
12 ```
13  #!/usr/bin/cscript
14  main(){puts("hello world");}
15 ```
17 One might even register .c as an executable file type:
19 ```
20 # echo ':cfile:E::c::/usr/bin/cscript:' > /proc/sys/fs/binfmt_misc/register
21 $ echo 'main(){puts("hello world");}' > a.c
22 $ chmod +x a.c
23 $ ./a.c
24 ```
26 It respects the `CC` environment variable, and does not create any temporary dentries that need to be cleaned up ever.
28 ### Building
30 ```
31 $ make
32 $ sudo make install PREFIX=/usr
33 ```
35 ### License
37 This project is released under the [GPLv2](COPYING).