#!/usr/bin/perl -T -I/h/COE/lib -w use strict; use Coe; my $VERSION="1.1.4.1"; if (@ARGV != 1) { &useage; } sub useage { print "Useage: $0 groupname \n"; exit 1; } my $arg1; my $flag="false"; my $name="dummy"; while (@ARGV > 0 ){ $arg1=cleanString(shift,1); if ("$arg1" eq "-h") { &useage; exit; } elsif ("$arg1" eq "--help") { print "HELP\n"; exit; } elsif ("$arg1" eq "-H") { print "HELP\n"; exit; } elsif ("$arg1" eq "-V") { print "VERSION: $VERSION\n"; exit; } elsif ("$arg1" eq "--version") { print "VERSION: $VERSION\n"; exit; } else { $name=$arg1; } } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # do simple sanity checks # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| if ("$name" eq "dummy") { &useage; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # define some stuff # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| coeRun ("/usr/bin/sudo", "/usr/sbin/groupdel", "$name"); |