Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation

From ScriptCS 0.14 this feature is supported by core, so module no longer needed.

ScriptCs.Shebang

Shebang support for ScriptCs

Module tells ScriptCs to ignore shebang line from parsing.

Without this module but with shebang in .csx file, you will get syntax error.

This module will be useful for scripting with ScriptCs on *nix systems.

Installation

  1. Install Mono
  2. Install ScriptCs for *nix systems: guide
  3. Create files in /usr/bin (or any other directory in your PATH) with this content:

scriptcs

#!/bin/sh

sciptcs_exe=<path to sciptcs.exe>

mono ${scriptcs_exe} $*

scriptcs_sh

#!/bin/bash
scriptcs $1 -- ${*:1}
  1. Make this files executable:
# In directory with scripts from above
chmod +x scriptcs
chmod +x scriptcs_sh
  1. Install ScriptCs.Shebang module globally:
scriptcs -i ScriptCs.ShebangModule -g
  1. Write example script: test.csx
#!/usr/bin/env scriptcs_sh

Console.WriteLine("Hello world");
  1. Make script executable:
chmod +x test.csx
  1. Now you can exec ScriptCs scripts just like any shell scripts. Enjoy!

About

*nix shebang support for ScriptCs

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages