Dear all,

        I've slung together a tiny little perl module to enable
periodic(8) scripts to access periodic.conf(5) settings without having
to use sh(1).  I thought it might be useful to some, so I tidied it up
and made it available for download at:

        http://www.plasm.demon.co.uk/FreeBSD-Periodic-0.1.tar.gz 

This all came about when I foolishly started porting some of the
periodic scripts over to a Solaris8 box.  Particularly
470.status-named.  Solaris `date' doesn't support the `-v' flag, so:

        date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'

becomes

        perl -MPOSIX "print strftime "%b %e", localtime (time - 24 * 60 * 60);"

and then Solaris `uniq' doesn't support the `-i' flag so:

        sort -f | uniq -ic |

becomes:

        perl -ne '$s{lc $_}++; \
          END { for (sort { $s{$a} cmp $s{$b} } keys %s) { \
            printf "%4d $_", $s{$_} } }'

by which time the script might just as well be pure perl anyhow...

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                          26 The Paddocks
                                                         Savill Way
                                                         Marlow
Tel: +44 1628 476614                                     Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to