{"id":31609,"date":"2021-04-13T21:01:09","date_gmt":"2021-04-13T19:01:09","guid":{"rendered":"https:\/\/www.linuxboxen.dk\/?p=31609"},"modified":"2021-04-13T21:01:09","modified_gmt":"2021-04-13T19:01:09","slug":"column-kommandoen-rigtig-smart-hvis-dit-fil-output-har-flere-kolonner","status":"publish","type":"post","link":"https:\/\/www.linuxboxen.dk\/?p=31609","title":{"rendered":"column kommandoen. Rigtig smart hvis dit fil output har flere kolonner."},"content":{"rendered":"<p>For at se indholdet i en fil som har flere kolonner kan du bruge column kommandoen som vist her.<\/p>\n<p>-t for kolonne og -s som adskiller her &#8216;:&#8217; kolon tegnet.<\/p>\n<pre>$ cat \/etc\/passwd | column -t -s :\nroot                 x  0      0      root                                        \/root                       \/bin\/bash\ndaemon               x  1      1      daemon                                      \/usr\/sbin                   \/usr\/sbin\/nologin\nbin                  x  2      2      bin                                         \/bin                        \/usr\/sbin\/nologin\nsys                  x  3      3      sys                                         \/dev                        \/usr\/sbin\/nologin\nsync                 x  4      65534  sync                                        \/bin                        \/bin\/sync\ngames                x  5      60     games                                       \/usr\/games                  \/usr\/sbin\/nologin\nman                  x  6      12     man                                         \/var\/cache\/man              \/usr\/sbin\/nologin\nlp                   x  7      7      lp                                          \/var\/spool\/lpd              \/usr\/sbin\/nologin\nmail                 x  8      8      mail                                        \/var\/mail                   \/usr\/sbin\/nologin\nnews                 x  9      9      news                                        \/var\/spool\/news             \/usr\/sbin\/nologin\nuucp                 x  10     10     uucp                                        \/var\/spool\/uucp             \/usr\/sbin\/nologin\nproxy                x  13     13     proxy                                       \/bin                        \/usr\/sbin\/nologin\nwww-data             x  33     33     www-data                                    \/var\/www                    \/usr\/sbin\/nologin\nbackup               x  34     34     backup                                      \/var\/backups                \/usr\/sbin\/nologin\nlist                 x  38     38     Mailing List Manager                        \/var\/list                   \/usr\/sbin\/nologin\nirc                  x  39     39     ircd                                        \/var\/run\/ircd               \/usr\/sbin\/nologin\ngnats                x  41     41     Gnats Bug-Reporting System (admin)          \/var\/lib\/gnats              \/usr\/sbin\/nologin\nnobody               x  65534  65534  nobody                                      \/nonexistent                \/usr\/sbin\/nologin\nsystemd-network      x  100    102    systemd Network Management,,,               \/run\/systemd\/netif          \/usr\/sbin\/nologin\nsystemd-resolve      x  101    103    systemd Resolver,,,                         \/run\/systemd\/resolve        \/usr\/sbin\/nologin\nsyslog               x  102    106    \/home\/syslog                                \/usr\/sbin\/nologin\nmessagebus           x  103    107    \/nonexistent                                \/usr\/sbin\/nologin\n_apt                 x  104    65534  \/nonexistent                                \/usr\/sbin\/nologin\nuuidd                x  105    111    \/run\/uuidd                                  \/usr\/sbin\/nologin\navahi-autoipd        x  106    112    Avahi autoip daemon,,,                      \/var\/lib\/avahi-autoipd      \/usr\/sbin\/nologin\nusbmux               x  107    46     usbmux daemon,,,                            \/var\/lib\/usbmux             \/usr\/sbin\/nologin\ndnsmasq              x  108    65534  dnsmasq,,,                                  \/var\/lib\/misc               \/usr\/sbin\/nologin\nrtkit                x  109    114    RealtimeKit,,,                              \/proc                       \/usr\/sbin\/nologin\ncups-pk-helper       x  110    116    user for cups-pk-helper service,,,          \/home\/cups-pk-helper        \/usr\/sbin\/nologin\nspeech-dispatcher    x  111    29     Speech Dispatcher,,,                        \/var\/run\/speech-dispatcher  \/bin\/false\nwhoopsie             x  112    117    \/nonexistent                                \/bin\/false\nkernoops             x  113    65534  Kernel Oops Tracking Daemon,,,              \/                           \/usr\/sbin\/nologin\nsaned                x  114    119    \/var\/lib\/saned                              \/usr\/sbin\/nologin\npulse                x  115    120    PulseAudio daemon,,,                        \/var\/run\/pulse              \/usr\/sbin\/nologin\navahi                x  116    122    Avahi mDNS daemon,,,                        \/var\/run\/avahi-daemon       \/usr\/sbin\/nologin\ncolord               x  117    123    colord colour management daemon,,,          \/var\/lib\/colord             \/usr\/sbin\/nologin\nhplip                x  118    7      HPLIP system user,,,                        \/var\/run\/hplip              \/bin\/false\ngeoclue              x  119    124    \/var\/lib\/geoclue                            \/usr\/sbin\/nologin\ngnome-initial-setup  x  120    65534  \/run\/gnome-initial-setup\/                   \/bin\/false\ngdm                  x  121    125    Gnome Display Manager                       \/var\/lib\/gdm3               \/bin\/false\nstatd                x  122    65534  \/var\/lib\/nfs                                \/usr\/sbin\/nologin\nlibvirt-qemu         x  64055  129    Libvirt Qemu,,,                             \/var\/lib\/libvirt            \/usr\/sbin\/nologin\nlibvirt-dnsmasq      x  125    132    Libvirt Dnsmasq,,,                          \/var\/lib\/libvirt\/dnsmasq    \/usr\/sbin\/nologin\nnvidia-persistenced  x  126    134    NVIDIA Persistence Daemon,,,                \/nonexistent                \/sbin\/nologin\n_flatpak             x  127    136    Flatpak system-wide installation helper,,,  \/nonexistent                \/usr\/sbin\/nologin\n<\/pre>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_31609\" class=\"pvc_stats all  \" data-element-id=\"31609\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>For at se indholdet i en fil som har flere kolonner kan du bruge column kommandoen som vist her. -t for kolonne og -s som adskiller her &#8216;:&#8217; kolon tegnet. $ cat \/etc\/passwd | column -t -s : root x 0 0 root \/root \/bin\/bash daemon x 1 1 daemon \/usr\/sbin \/usr\/sbin\/nologin bin x 2 [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_31609\" class=\"pvc_stats all  \" data-element-id=\"31609\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[5,2],"tags":[],"class_list":["post-31609","post","type-post","status-publish","format-standard","hentry","category-bash","category-tips"],"a3_pvc":{"activated":true,"total_views":10,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/31609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31609"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/31609\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}