in reply to Perl for Unix System Administration

This is another great craft from ++Gabor after CPAN::Forum. It's just simple and right to the point without gory details. And I'm sure that the examples will grow and grow. Perhaps you could add about service monitoring or quota alert?

I have my simple one myself you might want to consider. It's just another mass file operation type, similiar to the traverse file system stuff. But rather, mine's task is performing file permission changing (chmod), specifically, adding or repairing them to put 'w' bit for group. I'm not quite sure actually if this can be seen as sysadmin job. I usually run it for sharing purpose, for other users within the same group. However, the modes are customizable via command line options. Here it goes (I use -s for simpel CLO parsing).

#!/usr/bin/perl -ws use strict; use vars qw($f $d); use File::Find; my $start_dir = shift || '.'; my $dir_mode = $d ? oct($d) : 0775; my $file_mode = $f ? oct($f) : 0664; find \&wanted, $start_dir; sub wanted { my $mode = -d() ? $dir_mode : $file_mode; chmod $mode, $_ or die "Can't chmod $_: $!\n"; } __END__
Oh, a little note about this,
Writing an Excel file. (example coming soon). Many times we are required to create reports in text format. That's easy with Perl, that's what the Reporting part of the name Perl came from.
While it's a nice say, nevertheless, the name Perl was and is never meant as an acronym. The "Practical Extraction and Reporting Language" came later.

Replies are listed 'Best First'.
Re^2: Perl for Unix System Administration
by szabgab (Priest) on Apr 10, 2007 at 16:40 UTC
    Oh I did not mean THAT! I promise :-)

    Changed the partial reference to "Practical Extraction and Reporting Language" that might offend some of us ;_)

      I know you didn't, but before someone offensed and comes to punish you... :-)

      Perl name explanations eh? Hmm, I like that, sounds friendlier than retronym.