Perl [was: Help with AWK]

Alan Stebbens aks at hub.ucsb.edu
Tue Jun 27 16:07:18 AEST 1989


> BTW - I'm getting more and more hooked on awk for prototypes and small
> scale projects. You have to use it for a few small projects before you
> begin to appreciate it. Anyone for an awk newsgroup?
> ("comp.lang.inspired_by_a_bird"?)

This is not strictly limited to Sun systems, but before you get too tied
up with {[ng],}awk, you might consider Larry Wall's PERL (Practical
Extraction and Reporting Language).  It's an *excellent* system
administration tool, providing all the features of awk, csh, sed, and
more, in one language, and almost always doing it faster than them all.

We use it to perform system administration tasks on our groups of Sun
systems (> 60 Sun 3/{50,60,80,110,260}) where the only reasonable
alternative would have been to write the program in C; writing it in Perl
has the advantage of reduced development time, and immediate
transportability to all the other architectures we administrate.  We use
Perl scripts to do

   o	User account creation	      
   o	System accounting & billing reports
   o	Network monitoring & statistics data reduction
   o	Various system administration tasks

In general, we write Perl scripts before we write csh/sh scripts.  We also
use "shellform" in conjunction with Perl scripts to provide forms-entry
stuff.

Perl is free (check various anonymous FTP sites); we have Perl installed
and running on a Vax running Mt. Xinu 4.3BSD, a DecStation 3100 running
Ultrix, Sun 3's running OS 3.5 and 4.0.x {0<=x<=3}, and a NeXT running
Mach/4.3BSD.  We originally compiled Perl with the native C compilers on
each architecture, be we have recently been recompiling it with "gcc -O"
to increase its performance.

PS: To illustrate the power & flexibility of Perl: the Perl debugger is a
Perl script!



More information about the Comp.sys.sun mailing list