Shell apropiado Scripting en los servidores de Windows con el Perl
- Hecho: Shell scripting es una necesidad para cualquier serio ÉL admin que maneja un servidor. De automatizar reservas a comprobar registros y a mantener funcionamiento del servidor y la carga cheque, el scripting es a debe.
- Hecho: Shell scripting en Windows aspira. El mónada (energía Shell de Microsoft) procura fijar eso, pero los resultados se mezcla hasta ahora.
- Hecho: Shell scripting en Linux y otros sistemas operativos del *nix es de gran alcance, bien documentado, y absolutamente straight-forward.
La mayoría de la gente hecha una ojeada estos tres hechos, y viene inmediatamente a una conclusión. mal conclusión: usted no puede manejar correctamente un servidor de Windows porque intrínsecamente está careciendo en el departamento scripting de la cáscara.
Pero eso no es verdad… Porque aquí está otro hecho para usted:
Las escrituras del Perl son a gota-en el reemplazo para el 99%1 de todas las necesidades scripting de la cáscara.
Y otro hecho:
El Perl (desemejante de PHP) funciona grande (impresionante, de hecho) en Windows.
Ahora con estos dos hechos en mente, usted puede ahora hacer una conclusión apropiada: Shell scripting en Windows no tiene que ser difícil, limitándose, o en ningún inferior de la manera que en Linux.
El Perl es una lengua impresionante. Entre la comunidad en línea del Perl y millones de las muestras Perl-scripting a través de la tela, es absolutamente la lengua bien documentada y ningún sysadmin tiene una excusa para no utilizarla. Los módulos del Perl son un arsenal extenso de las escrituras pluggable fáciles de utilizar que usted referencia y funcionamiento justos.
El Perl era creado para la materia tenga gusto de esto. Es la lengua de la opción para cortar las escrituras rápidas que consiguen el trabajo hecho, fácilmente, rápidamente, y con poco dolor o esfuerzo. Una escritura del Perl hecha para funcionar en la voluntad de Linux funciona probablemente en Windows también, con poco a ningún cortar necesario para la mayor parte de la materia hacia fuera allí.
Con el Perl, usted puede hacer fácilmente cosas como maneja (pasa, grep, o clase) los ficheros de diario, reserva y ftp o email descargas del servidor de la base de datos, mantenimiento del web server del horario, y más.
Shell scripting con el Perl es incluso más fácil que la cáscara scripting en golpe - simplemente debido a las bibliotecas enormes disponibles que hacen incluso las tareas más mundanas y PITA absolutamente fáciles. Toma todas las 6 declaraciones (nos estamos refrenando adrede de contar líneas porque es esto Perl estamos hablando) para componer un email con su MySQL descargamos como accesorio de d de GZIP'.
Usted puede programar fácilmente las escrituras del Perl para funcionar en los intervalos regulares con el planificador de tarea - pero ése está sobre todos lo que usted necesitará siempre obrar recíprocamente con Windows para.
Una búsqueda rápida de Google revelará millones de resultados para “Escrituras de la gerencia del servidor del Perl.” Tome su selección, córtela, y funcione.
Here’s our 5-step guide to managing your server with Perl scripts:
- Download and install Perl for Windows (ActivePerl, free).
- Read the Perl FAQs and get familiar with the syntax. It’s nothing too complicated, and very simple to code in (though reading someone else’s code is another story). You absolutely don’t need anything more than the basic syntax, stuff like classes and functions are completely unnecessary for shell scripting - it’s too easy to even be considered programming!
- Write your Perl script. Use a real text editor like Notepad++.
- Test it by running it from the command line and ensuring it does what you need. Repeat step 3 as needed.
- Open up Scheduled Tasks in the Control Panel and set up a new task to run your Perl script however often you like.
Sure, maybe it’s not as easy it looks and it’ll probably take you a day or so to go from absolute zero to cranking your first Perl-based shell script; but soon enough you’ll be doing it blindfolded and with both your hands behind your back. And it’ll only be one line long, too!
The most important thing to realize is, you don’t need to be a programmer (or become one) in order to shell script in Perl.
Just pretend your Perl script is a batch file (yuck!). The Perl processor will run it from top to bottom, in a very straight-forward manner. Put one task/command per-line, stick loops where needed, and test constantly. You don’t need classes, you don’t need data structures, you don’t need object orientation, and you don’t even really need to use variables if you don’t want to!
We’ll be posting more details, guides, sample shell scripts, and how-to’s on Perl-based shell scripting in the weeks and months to come. Don’t give up just because it involves learning something new, this is in an investment that’ll last a lifetime. If you can shell script in Perl on Windows, you can do the same on Linux and OS X with ease. If you can shell script in Perl, you can do anything!
View all articles in the “Shell Scripting with Perl” category.
- We admit, that’s a made up statistic, give us a break though, will ya?
Written by Computer Guru. Read more great feeds at is source WEBSITE
no comments.
Read more articles on Perl and Macintosh and Server Management and Shell Scripting with Perl and Batch and Bash and Operating Systems and Coding and Programming and Windows and Linux and Guides and Hacking and software.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article














