I have used PHP CLI scripting language to create some automation scripts 
before. My solution was to create object oriented classes that where 
wrappers for system commands. In PHP you can detect the host platform 
then you code accordingly. I believe this is probably one of the best 
approaches to this problem, if you are using Perl CPAN is obviously a 
good place to look.

Dustin Puryear wrote:
> When it comes to scripting, it's difficult to do much automation
> outside of a platform. For example, I can write a bash or perl script
> to accomplish a task on Linux, FreeBSD, and UNIX, but it's hard to
> make that script work well in a Windows environment, or vice-versa
> (even with some of the nifty perl modules).
>
> Yet, I've been asked to talk about this very thing.
>
> In your mind, how do you see writing administrative scripts (e.g.,
> provisioning a user) with interoperability in mind? Certainly, we can
> write scripts that call a lower layer to do the actual grunt work
> based on platform (e.g., by creating an entry in LDAP, /etc/passwd, or
> AD when creating a user), but is it still too painful to write scripts
> that are truly cross-platform? What can you do? What can't you do? Why
> should or shouldn't you do it?
>
> I'd like to start up a discussion on this!
>
> ---
> Puryear Information Technology, LLC
> Baton Rouge, LA * 225-706-8414
> http://www.puryear-it.com
>
> Author:
>   "Best Practices for Managing Linux and UNIX Servers"
>   "Spam Fighting and Email Security in the 21st Century"
>
> Download your free copies:
>   http://www.puryear-it.com/publications.htm
>
>
> _______________________________________________
> General mailing list
> General at brlug.net
> http://brlug.net/mailman/listinfo/general_brlug.net
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://brlug.net/pipermail/general_brlug.net/attachments/20060829/baa787c2/attachment.htm

Reply via email to