Hide Forgot
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: The output of the following commands should only print the Organization ID, one per line, of all Organizations on the Satellite Server: hammer organization list | grep -vE '\--|ID' | awk '{ print $1 }' hammer --csv organization list | grep -vi '^id' | awk -F, '{ print $1 }' However, if there is a newline character in the "Description" field on the "Edit <Organization Name>" page available at Administer > Organizations > Primary, the text on the new line will show up in the "ID" field of the commands above. Reproducible: Always Steps to Reproduce: 1. Create an Organization with additional information on a new line in the Description field. 2. Login to the CLI of the Satellite Server as an admin user. 3. Run the commands included in this bug report. Actual Results: The additional information from the Description field will be on a line by itself in the "ID" field. Expected Results: Only numerical Organization IDs should be returned. Additionally, there are two "Description" fields in the output of "hammer organization list". This was observed on both Satellite versions 6.2.9 and 6.3.3.
Created redmine issue http://projects.theforeman.org/issues/25878 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25878 has been resolved.
Verified on Satellite 6.7 snap 6. New lines are now represented as white spaces. Also tried commands from comment 1. Output contains just IDs, each on its own line.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:1454