On Thu, Dec 21, 2006 at 08:05:05AM -0700, Tom Smith wrote: > Dr.Ruud wrote: > >Chad Perrin schreef: > > > >>Of course, if you're going to call out of the Perl script to the id > >>utility, you may as well skip the Perl script entirely and just enter > >>this at the shell prompt: > >> > >> id -Gn username > > > >That depends on what OP needs to do with the result. It could be part of > >a larger Perl script that is doing other stuff as well. > > Yeah, it is part of a larger script. It's running on a Linux server and > manipulating some Samba stuff for the Win32 clients. > > I try to avoid calling console commands because there tends to be > differences in some of the CLI utilities between distributions--that was > actually one of the first things I had considered doing, except with the > `groups` command.
That's why I said you may as well either just use the id utility from the shell if you're not going to grab group memberships in an idiomatically Perlish way -- the Perl code is likely to be more portable. Of course, specifying the path to the group file, as I originally suggested, might not be the most portable way to do that (in retrospect). -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "It's just incredible that a trillion-synapse computer could actually spend Saturday afternoon watching a football game." - Marvin Minsky -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>