bin/check.sh
2021-03-24 13:02:30 +03:00

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