C Sharp REPL

Mono
Mono comes with the 'csharp' command: predator:~$ csharp csharp> 2+2; 4 csharp> Math.Sin(Math.PI*.5); 1 csharp> var x = new List {1,2,3}; csharp> foreach(var x in l) { print(x*2); } 2 4 6 csharp> foreach(var l in File.ReadLines("file.txt")) Console.WriteLine(l); This is a text file with text in it The interactive interpreter enables using C# as a scripting language: predator ~$ cat < test.cs > #!/usr/bin/csharp > print(2+2); > eof predator ~$ chmod u+x test.cs predator ~$ ./test.s 4