Sample Header Ad - 728x90

how to columnate list of strings in two lines, aligned to the length of the first column

1 vote
5 answers
106 views
I have a list of strings:
python2-distutils-extra|==>|python2-distutils-extra|2.39-5|Enhancements to the Python build system
python2-fuse|==>|python2-fuse|1.0.5-1|This is a Python 2 interface to libfuse (https://github.com/libfuse/libfuse) , a simple interface for userspace programs to export a virtual filesystem to the Linux kernel                                               
python2-gobject2|==>|python2-gobject2|2.28.7-7|Legacy Python 2 bindings for GObject                                                                                                                                                                                     
python2-numpy|==>|python2-numpy|1.16.6-3|Scientific tools for Python 2
I want to get:
python2-distutils-extra ==> python2-distutils-extra 2.39-5
    Enhancements to the Python build system
python2-fuse            ==> python2-fuse 1.0.5-1
    This is a Python 2 interface to libfuse (https://github.com/libfuse/libfuse) , a simple interface for userspace programs to export a virtual filesystem to the Linux kernel                                               
python2-gobject2        ==> python2-gobject2 2.28.7-7
    Legacy Python 2 bindings for GObject                                                                                                                                                                                     
python2-numpy           ==> python2-numpy 1.16.6-3
    Scientific tools for Python 2
edit: aligned to the length of the first column means '==>' is always at the same position (just like in above code). I've already tried to get it with column, but doesn't matter which options of column I use the result is:
python2-distutils-extra                                                                                                                                                         ==>  python2-distutils-extra    2.39-5        
    Enhancements to the Python build system                                                                                                                                                                                  
python2-fuse                                                                                                                                                                    ==>  python2-fuse               1.0.5-1       
    This is a Python 2 interface to libfuse (https://github.com/libfuse/libfuse) , a simple interface for userspace programs to export a virtual filesystem to the Linux kernel                                               
python2-gobject2                                                                                                                                                                ==>  python2-gobject2           2.28.7-7      
    Legacy Python 2 bindings for GObject                                                                                                                                                                                     
python2-numpy                                                                                                                                                                   ==>  python2-numpy              1.16.6-3      
    Scientific tools for Python 2
Please, help...
Asked by ludvick (21 rep)
May 6, 2024, 10:47 PM
Last activity: May 25, 2024, 11:54 AM