[ 
https://issues.apache.org/jira/browse/ARTEMIS-4819?focusedWorklogId=923593&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923593
 ]

ASF GitHub Bot logged work on ARTEMIS-4819:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jun/24 07:17
            Start Date: 15/Jun/24 07:17
    Worklog Time Spent: 10m 
      Work Description: ViliusS opened a new pull request, #4980:
URL: https://github.com/apache/activemq-artemis/pull/4980

   Previously it was not so easy to parse `artemis user list` output. If one 
would want to do something in a bash script with every user he had to do 
something like this:
   
   ```
   while read -r user; do something with `echo $user | sed 
's/^"\(.*\)".*/\1/'`; done < ./artemis user list --url tcp://localhost:61616 
--user admin --password pass
   ```
   
   This patch splits user and roles with a space and removes quotes around the 
user. So now one could just do:
   ```
   while read -r user roles; do something with $user; done < ./artemis user 
list --url tcp://localhost:61616 --user admin --password pass
   ```




Issue Time Tracking
-------------------

            Worklog Id:     (was: 923593)
    Remaining Estimate: 0h
            Time Spent: 10m

> Improve user list output in CLI
> -------------------------------
>
>                 Key: ARTEMIS-4819
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4819
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Vilius Šumskas
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently  `artemis user list` command output is not very script friendly. It 
> prints users like this:
> {noformat}
> "krttmtr5zh3yx1j"(role_adm_krttmtr5zh3yx1j)
> "wge4qbpzykuqety"(role_adm_wge4qbpzykuqety)
> "8wezkl4yg0wmmcr"(role_adm_8wezkl4yg0wmmcr)
> "atrnohhggvhocqq"(role_adm_atrnohhggvhocqq){noformat}
> My proposal is to split users and roles with a space like this, so that the 
> output can be parsed and used in bash scripts more effectively:
> {noformat}
> krttmtr5zh3yx1j (role_adm_krttmtr5zh3yx1j)
> wge4qbpzykuqety (role_adm_wge4qbpzykuqety)
> 8wezkl4yg0wmmcr(role_adm_8wezkl4yg0wmmcr)
> atrnohhggvhocqq (role_adm_atrnohhggvhocqq){noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to