Link to home
Start Free TrialLog in
Avatar of joaotelles
joaotellesFlag for United States of America

asked on

Shell - output of a command into a table

Hi,

Im running this command but Im struggling to find the optimal way to have its output as a formatted table...

yum list all | tail -n +4
Unable to read consumer identity
Deployment_Guide-en-US.noarch              5.8-1.el5                   installed
MAKEDEV.x86_64                             3.23-1.2                    installed
NetworkManager.i386                        1:0.7.0-13.el5              installed
NetworkManager.x86_64                      1:0.7.0-13.el5              installed


I wanted to format the output into a table like:  ----> I have attached the output as well..

Package                                    Version                     Status
====================================================================================
Deployment_Guide-en-US.noarch              5.8-1.el5                   installed
MAKEDEV.x86_64                             3.23-1.2                    installed
NetworkManager.i386                        1:0.7.0-13.el5              installed
NetworkManager.x86_64                      1:0.7.0-13.el5              installed


Note that I need to ignore the warning line for the yum command... (Unable to read consumer identity)

Tks,
Joao
output.txt
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial