Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Tibor Balázs

Pages: [1]
Magyar / Group add script, CSV
« on: November 23, 2012, 09:16:26 pm »

Lehet tömegesen csoportokat felvenni!  :D
Futtatáskor kicsit el van vele, de működni látszik!

A megoldás nem az én érdemem:

Code: [Select]
root@zentyal:~/bin# ./
Group created: _valami4_
Group created: _valami5_
Group created: _valami6_
root@zentyal:~/bin# cat

use strict;
use warnings;

use EBox;
use EBox::UsersAndGroups::Group;


open (my $GROUPS, 'groups');

while (my $line = <$GROUPS>) {
  chomp ($line);
  my ($group, $comment, $system) = split(',', $line);
  EBox::UsersAndGroups::Group->create($group, $comment, 0);
  print "Group created: $group\n";
close ($GROUPS);

root@zentyal:~/bin# cat groups

Pages: [1]