Emulating Shell Functions in Perl

PERL SHELL SCRIPTS

Author(s):

Perl gives you better shell scripts. Sysadm::Install, a new module from CPAN, helps shell addicts let go of Bash.

System administration shell scripts are easily put together using just a few shell commands. An installation routine might use cp, mv, and chmod; a query script might depend upon grep, awk, or sed. If you need more, however, a shell script can start to become complex, or even ugly; and more times than not, you come to a dead end. The shell takes a very roundabout route to get to some places, and there are other places a shell script just can’t go. Creative programmers will always find an (admittedly obscure) way to work around the obstacles, and shells such as Bash, Ksh, and Tcsh have many features found in genuine programming languages. Also, if you prefer to avoid typing, standard Perl is not recommended for simple shell tasks. After all, who wants to have to enter something like the following:

Read full article as PDF:

Perl_Shell_Scripts.pdf (370.56 kB)

Related content

  • Perl: Clonezilla Backups

    Clonezilla makes backing up and restoring your system an easy affair that only involves a few key strokes. A homegrown solution reduces the time and effort to the act of slotting in a CD, on which you previously burned a Perl script.

  • Perl: noworries

    We'll show you how you can avoid the tragedy of lost files with a transparent, Perl-based version control system.

  • Perl: Network Backup

    Armed with just a rescue CD and a Perl script, you can back up a client’s hard disk across the wire.

  • Perl: Tmux Configuration

    Instead of manually rearranging windows in a development environment time and time again, the Tmux terminal multiplexer can restore them from a configuration script.

  • Perl: CMS with GitHub

    With its easy-to-use web interface, GitHub can be put to totally different uses than archiving code. For example, Perlmeister Mike Schilli used GitHub to deploy a content management system for simple websites.

comments powered by Disqus

Direct Download

Read full article as PDF:

Perl_Shell_Scripts.pdf (370.56 kB)

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia