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) 
> <[email protected]> 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  -  [email protected] 
> <mailto:[email protected]>
> http://lists.dot.net/mailman/listinfo/mono-list 
> <http://lists.dot.net/mailman/listinfo/mono-list>
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.dot.net/mailman/listinfo/mono-list

Reply via email to