Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Last active August 29, 2015 14:02
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 jonpryor/82427ba44a23276a6d17 to your computer and use it in GitHub Desktop.
Save jonpryor/82427ba44a23276a6d17 to your computer and use it in GitHub Desktop.
#!/usr/bin/env csharp
var args = Environment.GetCommandLineArgs ();
for (int i = 0; i < args.Length; ++i) {
Console.WriteLine ("{0}: {1}", i, args [i]);
}
$ ./a.cs foo bar b
0: /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/csharp.exe
1: ./a.cs
2: foo
3: bar
4: b
cs2001: Source file `/Users/jon/tmp/foo' not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment