[Mono-list] why not /usr/bin/csharp scripts?
curylod at asme.org
Mon Nov 7 22:28:05 UTC 2016
It’s perfectly viable for self-contained scripts and I use it for things like service wrappers and xplat testing. It fell down for me around the I/O side of things, either piping values in from other applications or passing command line parameters in to the script, although it’s probably somewhat possible via Environment.GetCommandLineArgs. It really seems to be more intended for a REPL, and not composed with other scripts and applications like one often does.
FWIW - I had more luck with FSharp .fsx files, as you have a well defined entry point plus tooling and full xplat support for the language itself.
> On Nov 7, 2016, at 4:35 PM, Edward Ned Harvey (mono) <edward.harvey.mono at clevertrove.com> wrote:
> I'm curious how viable it is, to use C# as a scripting language, instead of or in addition to python, etc, for devops tasks. When I google for "c# script" and similar searches, I find a ton of fragmented projects claiming to do similar things. Then I discover /usr/bin/csharp has been around for 8 years, and is included in mono-core since at least mono 2.10, and can be used as a script interpreter via #!/usr/bin/csharp. So far I've done nothing more than hello world, but I'm wondering, is this not a good direction to go? Why are there so many attempts to reinvent the wheel? Does /usr/bin/csharp have some horrible limitations or something?
> TIA for advice or comments...
> Mono-list maillist - Mono-list at lists.dot.net <mailto:Mono-list at lists.dot.net>
> http://lists.dot.net/mailman/listinfo/mono-list <http://lists.dot.net/mailman/listinfo/mono-list>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list