http://www.perlmonks.org?node_id=829193


in reply to Re: Want to Create Unix group using perl script
in thread Want to Create Unix group using perl script

It seems groupadd already does everything the OP wants: if the group doesn't exist, it adds it - if it does exist, it prints a message it already exists.

Looks to me the OP just wants a three line shell script. Doesn't seem worth the trouble of writing a Perl wrapper for that.

  • Comment on Re^2: Want to Create Unix group using perl script