Quando eu executo este script
mysql -e "use sentry;
select DISTINCT
concat(
'CREATE ROLE \`',
r.ROLE_NAME,
'\`;')
from
SENTRY_ROLE r
join SENTRY_ROLE_DB_PRIVILEGE_MAP rp on rp.ROLE_ID = r.ROLE_ID
join SENTRY_DB_PRIVILEGE p on p.DB_PRIVILEGE_ID = rp.DB_PRIVILEGE_ID
;" -u mysql_sel -p$Pass
eu recebo saída de
+---------------------------------------------------------+
| concat(
'CREATE ROLE `',
r.ROLE_NAME,
'`;') |
+---------------------------------------------------------+
| CREATE ROLE `admin_role`; |
Como posso obter a saída de apenas
+---------------------------------------------------------+
| CREATE ROLE `admin_role`; |