I have the following output of my script:
panos@panos:~/scripts> ./list_packages openSUSE-2016-254
zypper-aptitude.noarch : 1.12.23-1.1 update needed
zypper-log.noarch : 1.12.23-1.1 update needed
libsolv-debugsource : None not installed
libsolv-demo : None not installed
libsolv-demo-debuginfo : None not installed
libsolv-devel : None not installed
libsolv-devel-debuginfo : None not installed
libsolv-tools : 0.6.14-1.1 update needed
libsolv-tools-debuginfo : None not installed
perl-solv : None not installed
perl-solv-debuginfo : None not installed
python-solv : 0.6.14-1.1 update needed
python-solv-debuginfo : None not installed
ruby-solv : None not installed
ruby-solv-debuginfo : None not installed
libzypp : 15.19.5-1.1 update needed
libzypp-debuginfo : None not installed
libzypp-debugsource : None not installed
libzypp-devel : None not installed
libzypp-devel-doc : None not installed
zypper : 1.12.23-1.1 update needed
zypper-debuginfo : None not installed
zypper-debugsource : None not installed
The output is generated based on some if-else statements. Let me give you the three echo commands used in my source code:
echo "$pkg : $pkg_version update needed"
echo "$pkg : $new_version updated"
echo "$pkg : None not installed"
My problem is that is would like them to be in columns, something like:
$pkg\t$pkg_version\t$message
But because some packagenames are >8 characters longs, the whole 'tab'-thing, gets ugly. Any suggestions?