[
https://issues.apache.org/jira/browse/ARTEMIS-4819?focusedWorklogId=923841&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923841
]
ASF GitHub Bot logged work on ARTEMIS-4819:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Jun/24 08:06
Start Date: 18/Jun/24 08:06
Worklog Time Spent: 10m
Work Description: ViliusS commented on PR #4980:
URL:
https://github.com/apache/activemq-artemis/pull/4980#issuecomment-2175466690
While I agree that JSON could be suitable for programming languages which
natively support it, I don't really think that it is in a spirit of Bash shell
scripting. Parsing JSON would involve much more complicated steps, first
parsing the output, then somehow storing parsed data in a temporary variable,
and only then doing needed actions on users. It also assumes that jq or any
other JSON tool is available, which is not necessary true.
Linux already has all the tool it needs for such trivial task and all of
them use spaces as parsing markers, does parsing automatically, effectively
directly from SDIN.
Issue Time Tracking
-------------------
Worklog Id: (was: 923841)
Time Spent: 0.5h (was: 20m)
> 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: 0.5h
> 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