Skip to content

larsks/cscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

cscript

Run C files like shell scripts.

Install

  1. Install the handler.

     install -m 755 cscript /usr/local/bin/cscript
    
  2. Register the handler with binfmt_misc:

     sudo tee -a /proc/sys/fs/binfmt_misc/register < binfmt_register
    

Example

cat > hello.c <<EOF
//!cscript

#include <stdio.h>

int main() {
  printf("Hello, world!\n");
  return 0;
}
EOF

chmod 755 hello.c
./hello.c

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published