11 lines
304 B
Bash
11 lines
304 B
Bash
#!/bin/bash
|
|
|
|
|
|
echo "select id,login from users where auth_source_id=2 and status=1 and id not in (select user_id from groups_users where group_id=19);" | mysql -s redmine | while read a; do
|
|
ID=$(echo $a | cut -f 1 -d\ )
|
|
LOGIN=$(echo $a | cut -f 2 -d\ )
|
|
echo "insert into groups_users $ID,19;"
|
|
done
|
|
|
|
|