[Mono-list] Scripting the Linux OS with Mono
ted leslie
tleslie at tcn.net
Thu Nov 10 19:16:29 EST 2005
I too find it appealling to use C# in place of perl, etc.
I am not sure what your asking can happen with the mono distro.
you could however, if you don't want to just have
my_script.cs
my_script.exe
as a "pair" and use the exe to execute your script, that goes without saying.
i guess you could make a shell script that woud say
monoscript my_script.cs <arg1> <arg2>
that would compile it to a temporary file /tmp/csexe_<uniqueid>.exe (in tmp?)
and run the exe with the args essentially giving you what you want
and removing the tmp exe when done ?
no different then
perl my_script.pl <arg1> <arg2>
just that "monoscript" is this shell beast you write, which would be a few lines.
except you would have to know how to "make" your exe based on whats in the *.cs file
and not what would be in a Makefile, for its libraries ?
i would personally love to see more movement in this area .. i.e. mono/C# as a linux/unix
scripting language!
maybe in the end it just needs to be formalized by someone at mono?
-tl
On Thu, 10 Nov 2005 19:02:49 -0500
Abe Gillespie <abe.gillespie at gmail.com> wrote:
> Hey all,
>
> I was wondering if there's any easy way to run C# scripts in Mono.
> I'm fairly new to Linux (just at about a year) and I'd like to avoid
> learning yet another language (Perl, sh, etc.). Has anyone written a
> .Net program that takes a file as input and runs that code? Perhaps
> Mono can do this natively? How cool would it be to have startup
> scripts written in C#?!
>
> Thanks for the help as always.
> -Abe
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list