#!/usr/intel/bin/perl open(inputFile, "/pgadm1/adm/cleaw/grpmgr-FM/test/spool.grpmgradd.gnooi.grpmgr.40074"); @spoolFile = ; close(inputFile); foreach $i (@spoolFile){ chomp($i); @fields = split(/:/, $i); } $grpLead = $fields[1]; $grpName = $fields[2]; $userName = $fields[3]; print "\$grpLead is $grpLead \n"; print "\$grpName is $grpName \n"; print "\$userName is $userName \n"; #system "/usr/local/bin/edgrp add $userName $grpName"; open(edgrpFile, ">/pgadm1/adm/cleaw/grpmgr-FM/test/editgrpFile"); print edgrpFile "/usr/local/bin/edgrp add $userName $grpName \n"; system("chmod 755 /pgadm1/adm/cleaw/grpmgr-FM/test/editgrpFile"); system("/pgadm1/adm/cleaw/grpmgr-FM/test/editgrpFile"); #`/pgadm1/adm/cleaw/grpmgr-FM/test/editgrpFile`; close(edgrpFile); @passwdEntry = `/usr/bin/ypmatch $grpLead passwd`; for $j (@passwdEntry){ chomp($j); @passwdField = split(/:/, $j); } $passwd = $passwdField[1]; open (owner, ">/pgadm1/adm/cleaw/grpmgr-FM/test/ownerFile"); print owner "$grpLeader \n"; print owner "$passwd \n"; close(owner);