From unknown Mon Jun 23 16:45:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30430 <30430@debbugs.gnu.org> To: bug#30430 <30430@debbugs.gnu.org> Subject: Status: [column] accounting for ansi color codes Reply-To: bug#30430 <30430@debbugs.gnu.org> Date: Mon, 23 Jun 2025 23:45:01 +0000 retitle 30430 [column] accounting for ansi color codes reassign 30430 coreutils submitter 30430 Boruch Baum severity 30430 normal tag 30430 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 01:07:34 2018 Received: (at submit) by debbugs.gnu.org; 12 Feb 2018 06:07:34 +0000 Received: from localhost ([127.0.0.1]:38837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1el7H3-0007NI-TC for submit@debbugs.gnu.org; Mon, 12 Feb 2018 01:07:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1el7H2-0007N3-Mm for submit@debbugs.gnu.org; Mon, 12 Feb 2018 01:07:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1el7Gw-0007aD-Ny for submit@debbugs.gnu.org; Mon, 12 Feb 2018 01:07:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1el7Gw-0007Zq-KN for submit@debbugs.gnu.org; Mon, 12 Feb 2018 01:07:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1el7Gv-0001AF-KO for bug-coreutils@gnu.org; Mon, 12 Feb 2018 01:07:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1el7Gr-0007Ud-ED for bug-coreutils@gnu.org; Mon, 12 Feb 2018 01:07:25 -0500 Received: from mout.gmx.net ([212.227.15.18]:46651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1el7Gr-0007T6-4t for bug-coreutils@gnu.org; Mon, 12 Feb 2018 01:07:21 -0500 Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MY7dI-1fFxxu0Vzk-00UqyG; Mon, 12 Feb 2018 07:07:18 +0100 Date: Mon, 12 Feb 2018 01:07:15 -0500 From: Boruch Baum To: bug-coreutils@gnu.org, =?utf-8?B?UO+/vWRyYWln?= Brady Subject: [column] accounting for ansi color codes Message-ID: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20171215 X-Provags-ID: V03:K0:kVg7jJtjxVB8/oSWUglzdVr2JhfG082gK/JiahLKDmWAyf4PpJY EWNRYg0Qk2/9qaTfo8ikGVYOoljNPIXephUVwqvvAAyeYiiC62r2eHlThNFgLGNFfUihNJ7 aNTJ/GvAsAUjbHkeufR6blX9iLKdQmQ0Yh9aomTRZLvHMVi6In0PEnW8WIStzbVU9F5NP0z nZp8YNxOzRpUC096YqfSg== X-UI-Out-Filterresults: notjunk:1;V01:K0:BZny7ywGeEo=:9qkcfVEp1Qw8qbxl0rwXYe 5D3r7xil5LbFoNPsyqj6m0ivXOcO+/MWYCl76iOX+X3oknuiZuJ3O0SS11EeKynQgIktKUSL6 AxOuesGkvsnEPfpilhYlLNvbKprtCaN9j6WAqRCcekqcUtdPdsOapXuFctW8UeVeJ02UJkCXy 2f8BSPQc4RxFbqLrcQ1mP6Q2joP2qKQfqzNeMOyozZr+TGGZaqLHNQb+FdDHZlUVWPSTZplhL OB8ACIKO3dLqG2g0OTQMBpmqsNC9BgwLIgCD7M81eLCn8GeqTrTiOe121HtYGfM4BNv8lJrAK QC6YcvdNSGdca6+lXLslmWPn5TPiHTHKQhKWKdY5rVXnxC87DxWMedY5A2EjAqV3+IzvC7Yn5 i1AMS4dxwesSzijgs5Hy9US5anrPhf8tdgakoqUsHzU1nsaYhM79aHe1rtMV8tMM66ls5viAA /iFwVYHda0Lwmk36zy6w7yazd3sCQDsXqZbZtBF76MoSQzGMomJdwy7akhHBihg8nFj4HIjDM ygMpXxB4TvYZlMhsngruE7aFC+zgymQ2RW19amP9MNFyXxzRvL/QHT44+/HivSFiuYmbpTgHx F7pk0tiL7NxVNmCPOohQ+QVPoNlTJGMGCnIBS5zJBv9giIJSjY2tQGPyZ+raVgsqZMfWrUtGe mnIWOsh5EETYkIrqWEE5g6b6rm1Q8FkrF6oJqppzIe+n3GGSmc9Dtoe68KwGnoxx1CZEUkKwy JQcXFWax92JmUu3+qf+StKgIPV4AH6i+Z2OzTAi5AyMBTFAz/vBZXQLsGPprHQoas7rRkz2+h 5G0NTs21VdsOJijejk333OVHoGSIw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) The `column -t' command doesn't align input properly when that input includes ansi color codes. An argument that it should do so, is that `column' serves to make input more readable, and easier to find and compare fields of input data - the same goal as colorization. I encountered this when trying to columnate log output that had been fed through the colorization program `ccze'. Example: Compare the output of the following two one-liners: awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ /var/log/dpkg.log | column -t awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ /var/log/dpkg.log | ccze -m ansi -o noscroll >&1 | column -t -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 02:23:40 2018 Received: (at 30430) by debbugs.gnu.org; 12 Feb 2018 07:23:40 +0000 Received: from localhost ([127.0.0.1]:38886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1el8Si-0001BE-GB for submit@debbugs.gnu.org; Mon, 12 Feb 2018 02:23:40 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:54695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1el8Sf-0001B1-FB for 30430@debbugs.gnu.org; Mon, 12 Feb 2018 02:23:39 -0500 Received: from [192.168.101.10] ([91.12.162.140]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M8QnS-1eYZcG1BVi-00vz4l; Mon, 12 Feb 2018 08:23:30 +0100 Subject: Re: bug#30430: [column] accounting for ansi color codes To: Boruch Baum , 30430@debbugs.gnu.org, P@draigBrady.com References: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> From: Bernhard Voelker Message-ID: <3580dd27-3b82-ae75-62aa-9bdc4b5d46d2@bernhard-voelker.de> Date: Mon, 12 Feb 2018 08:23:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:gNglwmelNPWUngQdBv7oUWXmB1eJP7S8/YZ+zYfWzCnA6qvrA5y tRMd36Zqn0/8eBf6C9pBtIRohGrL701ARGA7uSyitSPSHdeisrFgGtn6HaaOJk7RGouC8fa 8mI03TwjEElQOngDg0ZpUhn0Uo/0wnvGDP5ze8WuwV3gNQIbQ8VTOV586514oTslIy7K+7o gCNcN8u0Z9/qOXHE3AtUg== X-UI-Out-Filterresults: notjunk:1;V01:K0:oGGdY3YewT8=:fOz0anIL1PuCkoxQst1an4 k1t5+eN524lSQAAfBLFxmgJMKwsfevwTvb5peInHaTJmsTGBCatCjo/ETVdaHP+S4UkyQQCle KJknGJ7kUH3AQQNR4kgHQQIkKb0YUsS4GOMaIrmVclV086eHXdqt6HCccwusoQUL6LZK3Hb8y QxuebxaZeIWQNE8ciaNK4E/NO5Q/Jgss2R3qVmCESBTmwrjiq7PA0+XPSAiawAaKsqso4wl/r FJvmMqRxFm3zlQ4lnxQBNUlgNbNKgQ3w0md2bldkLmgwbbEqKXJ6oL6z59VNdamptXsTrrfJG MnKg5/ltkPSWPz+/8Gqzc0r+wNC6HC9WUHuqY1hZcyaP0w/DJMO9kA3zPasQM58lVHaAWj4ae uICTgJDn0IDN4r2lcjvA1pr3VF/znF1e+z9fdJqdx7faBAFxX+ERjtFqlUp/6z2j38KFlvYIC Cux2h0dXuEX/QFTazACbd16YxoiCbeecuNiLETqChTiRlW/80n1TK2vCgLTsCgajZteGqaEY+ x+kduf+4wFBHVRbuQiyvG6ArN0WosJ3zum1Lm6zJa+WKvsNYSohWqcnbawCJDlAEpfCFaaUtH pJCf+j3hFm9kpuBe0txz1N4YvKgB/jYMOFyvdp7oytxU+xaU4tyeCUfadNm7UDM3D2BPA0RNS vWH++rYWoAfgnMrEuEjBWO4KKdNdc0FwJmUg4g4T8SoORAwe6Deh++cmjz7Frj1LmQQpceJHl dvAJYK0o0XhL9L+axTf/TmyxRjlvWgkG/qVbRs9rTwU3CnL5bDNSMhyWsMs= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30430 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 02/12/2018 07:07 AM, Boruch Baum wrote: > The `column -t' command doesn't align input properly when that input > includes ansi color codes. > > An argument that it should do so, is that `column' serves to make input > more readable, and easier to find and compare fields of input data - the > same goal as colorization. > > I encountered this when trying to columnate log output that had been fed > through the colorization program `ccze'. > > Example: Compare the output of the following two one-liners: > > awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ > /var/log/dpkg.log | column -t > > awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ > /var/log/dpkg.log | ccze -m ansi -o noscroll >&1 | column -t Unfortunately, you did not show us neither the input - and I don't have dpkg -, nor the output, so I'd have to guess what you think might be going wrong. Would you provide a simple reproducer, please? In the following example, column(1) produces correct output: $ printf "%s\n" \ "this_is_a_long_string 99" \ "short abcdefghijklmnop" \ | ccze -m ansi -o noscroll \ | column -t this_is_a_long_string 99 short abcdefghijklmnop FWIW: what happens if you switch the two formatting commands, i.e., use $ ... | column -t | ccze ... instead of $ ... | ccze .... | column -t ? At least when the input uses a different separator, then you'd have to do that anyway - otherwise the separation of the columns is messed; compare: $ head -n3 /etc/passwd | ccze -m ansi -o noscroll | column -t -s: $ head -n3 /etc/passwd | column -t -s: | ccze -m ansi -o noscroll Is that the same what's happening to you? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 07:22:37 2018 Received: (at 30430) by debbugs.gnu.org; 12 Feb 2018 12:22:37 +0000 Received: from localhost ([127.0.0.1]:38985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elD7z-00084V-NK for submit@debbugs.gnu.org; Mon, 12 Feb 2018 07:22:36 -0500 Received: from mout.gmx.net ([212.227.17.22]:37951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elD7x-00084H-R5 for 30430@debbugs.gnu.org; Mon, 12 Feb 2018 07:22:34 -0500 Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MhNk6-1f7qLr3luU-00MZFY; Mon, 12 Feb 2018 13:22:26 +0100 Date: Mon, 12 Feb 2018 07:22:22 -0500 From: Boruch Baum To: Bernhard Voelker Subject: Re: bug#30430: [column] accounting for ansi color codes Message-ID: <20180212122222.koi7k4v6tx265dfw@E15-2016.optimum.net> References: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> <3580dd27-3b82-ae75-62aa-9bdc4b5d46d2@bernhard-voelker.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="zepmueu7o2muieao" Content-Disposition: inline In-Reply-To: <3580dd27-3b82-ae75-62aa-9bdc4b5d46d2@bernhard-voelker.de> User-Agent: NeoMutt/20171215 X-Provags-ID: V03:K0:tHbrd84nTm4sW1QI2mJqq+kqX+qgsOdYhRMfei764fMNfyVlzwT sktI86kuNV60nmrraskeTGgJQSQ0ASUOl9kPTfnOTiWBYFq/sHEKUTqUb6IWnPQVObcd19U qFxaYiHzTeOg4bTocIL/lbnOXHbGoiHLkbKFb67LJTFTsbSiXc5VvU9UBUnAG2IMDRtu777 bDDA0Hi/yO+TAM7mvM2Eg== X-UI-Out-Filterresults: notjunk:1;V01:K0:F0Rm+oDpCzA=:Tss9sitWMPiCOy8bFm8KzS N3d2zx5EnJVCjGEIbg40OxUlNDfeN0nzGpbonAKDE19GS5oF57lprELmecPtE4k/OCgM2cY0f Gs/xxF2HpHdJj0Gtjm5K0sVQb7vpIZI3Zwa87/CTnwzjOATJjjK2pIoqz+uREj3UNfd7TmAQa mz2gexDQ/YFXBi0IK1aGvpsBoIyzHweAQYGMdrMxVRxziUQAiccbU+kWRJQDgRWD/dRnf11er jxjiy8q90QijGlCMfy5DwgZbnESH8kpFXgqHewuLroB2+/Z/3iTPtmZtSlzi2cjFZLWwFUwYS HQT7/lY2EckDMU2KMcOfkR4NzvWcnjJVsIszugaox8srMjB1X6jYyuio20aAv78rNGdc2X4DN TAIP4o36jkvHBClduFQwDxyYHXKqvCViDk33kmaBgqObmW5otC6jOkbgLZALFaPEvvAb9AX0I oBSvFLUKC01/vJUvEGnbZoSgdhjAb/Hj7fWmH/WuhardpL0Kv0RCsoBRUOxFcR8Jw7FxHiXIy sq/tYAGQHQ43tAWmB918Rqt7tjlAjKgH/FpFenhVu2MCtrTGmikq4R+thgqfvMTdRzm8nO72K FzjA/UP5+8vn5/4m+mU4V9GFcOIq9OND+08Uekv1uvRSp17wz5MAQBgOZZVaX4CeKr9v/v7ku YPz6PORbyBGr+39snsSuyr8OjBupjMDKqcMXe2bjn8vDfAkt6uPLzkzS3KXmD0uk1F3OvZicz 04GoMjhZCj4MKcj3DBq+6dqhBTBxrgtI+ZUcVAwmjULtvE8sjq6t5RblN3N5s0jX8lOQrG/zI tJWrnE84dPD/L6OGFRBg+KEa0PbMQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 30430 Cc: P@draigBrady.com, 30430@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --zepmueu7o2muieao Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2018-02-12 08:23, Bernhard Voelker wrote: > On 02/12/2018 07:07 AM, Boruch Baum wrote: >> ... > Unfortunately, you did not show us neither the input Easy... A sample input would be: 2018-02-09 11:10:27 status unpacked libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status half-configured libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status installed libefivar0:amd64 0.15-3 2018-02-09 11:10:28 trigproc man-db:amd64 2.7.0.2-5 2018-02-09 11:10:28 status half-configured man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 status installed man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 configure efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status unpacked efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status half-configured efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status installed efibootmgr:amd64 0.11.0-3 > - and I don't have dpkg -, nor the output, Also easy. First, an easily readable sample output, without piping colorization into `column' would be, : >> awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ >> /var/log/dpkg.log | column -t 2018-02-09 11:10:27 status unpacked libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status half-configured libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status installed libefivar0:amd64 0.15-3 2018-02-09 11:10:28 trigproc _ man-db:amd64 2.7.0.2-5 2018-02-09 11:10:28 status half-configured man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 status installed man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 configure _ efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status unpacked efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status half-configured efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status installed efibootmgr:amd64 0.11.0-3 For the colorized output, ie. the actual raw output and the subject of the bug report, here are two versions. First, in-line, with the colorization codes stripped out so that it might be easily readable by all, and; second, in raw format, as an mail attachment file, to avoid having the control sequences somehow possibly messing with some hapless reader's TTY. >> awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ >> /var/log/dpkg.log | ccze -m ansi -o noscroll >&1 | column -t 2018-02-09 11:10:27 status unpacked libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status half-configured libefivar0:amd64 0.15-3 2018-02-09 11:10:28 status installed libefivar0:amd64 0.15-3 2018-02-09 11:10:28 trigproc _ man-db:amd64 2.7.0.2-5 2018-02-09 11:10:28 status half-configured man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 status installed man-db:amd64 2.7.0.2-5 2018-02-09 11:10:29 configure _ efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status unpacked efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status half-configured efibootmgr:amd64 0.11.0-3 2018-02-09 11:10:29 status installed efibootmgr:amd64 0.11.0-3 > FWIW: what happens if you switch the two formatting commands, i.e., use > > $ ... | column -t | ccze ... > > instead of > > $ ... | ccze .... | column -t > > ? ! The colorization is not usefully applied, ie. the entire output is monochrome, but in a color different that the input or normal STDOUT. > At least when the input uses a different separator, That would be a misunderstanding in what `ccze' does. It is specifically intended for log files only. See, for example, man (1) ccze. > then you'd have to do that anyway - otherwise the separation of the > columns is messed; > compare: > > $ head -n3 /etc/passwd | ccze -m ansi -o noscroll | column -t -s: As above, the colorization is not usefully applied, ie. the entire output is monochrome, but in a color different that the input or normal STDOUT. > $ head -n3 /etc/passwd | column -t -s: | ccze -m ansi -o noscroll A reasonably colorized output is applied. -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --zepmueu7o2muieao Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="warning_-_columnized_ccze_output_including_raw_ansi_color_codes.txt" Content-Transfer-Encoding: quoted-printable =1B[22m=1B[1m=1B[36m2018-02-09 11:10:27=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32munpacked=1B[0m= =1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mlibefivar0:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.15-3=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:28=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32mhalf-configure= d=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mlibefivar0:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.15-3=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:28=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32minstalled=1B[0= m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mlibefivar0:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.15-3=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:28=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[36mtrigproc=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[36m_=1B[0m=1B[22m=1B= [36m =1B[0m=1B[22m=1B[36mman-db:amd64=1B[0m=1B[22m=1B[36m = =1B[0m=1B[22m=1B[36m2.7.0.2-5=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[3= 6m<=1B[0m=1B[22m=1B[36mnone=1B[0m=1B[22m=1B[36m>=1B[0m=1B[22m=1B[36m =1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:28=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32mhalf-configure= d=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mman-db:amd64=1B[0m=1B[22m= =1B[36m =1B[0m=1B[22m=1B[36m2.7.0.2-5=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:29=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32minstalled=1B[0= m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mman-db:amd64=1B[0m=1B[22m= =1B[36m =1B[0m=1B[22m=1B[36m2.7.0.2-5=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:29=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[36mconfigure=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[36m_=1B[0m=1B[22m=1B= [36m =1B[0m=1B[22m=1B[36mefibootmgr:amd64=1B[0m=1B[22m=1B[36= m =1B[0m=1B[22m=1B[36m0.11.0-3=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[3= 6m<=1B[0m=1B[22m=1B[36mnone=1B[0m=1B[22m=1B[36m>=1B[0m=1B[22m=1B[36m =1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:29=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32munpacked=1B[0m= =1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mefibootmgr:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.11.0-3=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:29=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32mhalf-configure= d=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mefibootmgr:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.11.0-3=1B[0m =1B[22m=1B[1m=1B[36m2018-02-09 11:10:29=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m= =1B[1m=1B[33mstatus=1B[0m=1B[22m=1B[36m =1B[0m=1B[22m=1B[32minstalled=1B[0= m=1B[22m=1B[36m =1B[0m=1B[22m=1B[1m=1B[31mefibootmgr:amd64=1B[0m=1B[= 22m=1B[36m =1B[0m=1B[22m=1B[36m0.11.0-3=1B[0m --zepmueu7o2muieao-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 16:33:53 2018 Received: (at 30430) by debbugs.gnu.org; 17 Feb 2018 21:33:53 +0000 Received: from localhost ([127.0.0.1]:48694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enA7F-0007qQ-5h for submit@debbugs.gnu.org; Sat, 17 Feb 2018 16:33:53 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:59996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enA7D-0007qJ-ME for 30430@debbugs.gnu.org; Sat, 17 Feb 2018 16:33:51 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id AC6BD9FB0; Sat, 17 Feb 2018 21:33:50 +0000 (GMT) Subject: Re: bug#30430: [column] accounting for ansi color codes To: Boruch Baum , 30430@debbugs.gnu.org References: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <173746ce-56d0-b3de-3356-d331353b1693@draigBrady.com> Date: Sat, 17 Feb 2018 13:33:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30430 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 11/02/18 22:07, Boruch Baum wrote: > The `column -t' command doesn't align input properly when that input > includes ansi color codes. > > An argument that it should do so, is that `column' serves to make input > more readable, and easier to find and compare fields of input data - the > same goal as colorization. > > I encountered this when trying to columnate log output that had been fed > through the colorization program `ccze'. > > Example: Compare the output of the following two one-liners: > > awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ > /var/log/dpkg.log | column -t > > awk '{sub("install|configure|upgrade|trigproc","& _",$3);print}' \ > /var/log/dpkg.log | ccze -m ansi -o noscroll >&1 | column -t > Note column(1) is part of the util-linux project. We've similar considerations though with wc -L which we've at least mentioned at: http://www.pixelbeat.org/docs/coreutils-gotchas.html#wc From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 22:45:31 2018 Received: (at 30430) by debbugs.gnu.org; 30 Oct 2018 02:45:32 +0000 Received: from localhost ([127.0.0.1]:52686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHK27-0006pV-Lm for submit@debbugs.gnu.org; Mon, 29 Oct 2018 22:45:31 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:37774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHK22-0006g6-Qz; Mon, 29 Oct 2018 22:45:27 -0400 Received: by mail-pl1-f177.google.com with SMTP id bh10-v6so4763976plb.4; Mon, 29 Oct 2018 19:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=u2VyHCMN1o6aw6PBGsZH7BV3KWjcFufMpeE1g70B9eY=; b=fZKZuYA428vntX98OL8sgixaIXKF7/am+3XMmCio1c/9WG1nOP+l7GFGG1DNSUvImb 3ow1jiUODGMvc8la18opl9LPl9IAsDRLs1C0DG2QzDFYIi13vb3iKg4F7xSy2/hHJ7nQ ZdH3WykHqNUpcK8c7nQFfxMfcTF6pPppwQ5nmtBvLJZnw24Yb2QZwie6pwmo5H0VWieL 5YIyuFoYVdU9v6IRH4Nw6hfBD9kcob3VhShlmIoH57w94suoemLQFL5HTATSWuiW9hVF b6FXzmNeDyP8xdK77eMPCi1DWQSMGBEgTLXwsVq7KsltxVhBaQ3kQ97wnUXXgN8dmFrf nLHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u2VyHCMN1o6aw6PBGsZH7BV3KWjcFufMpeE1g70B9eY=; b=AlEOqzadLpEtkV8plfWz+OzHMMf/MnPU/WP00TCyTyPvfex0NSdskb3PsI4dYG1ldE XykpUHT/DpEcd+9A+AopLDYcurPDht8NE3PjqdefxO4g0Uj+9bDzF3SpAXQUznn27B9d //AvLZPnllX7ofJ39WpIb2N5+tZRjbXiUatAnNS32mDnFB8D+teevkif5jLr2U87D/Qf ai0cPzuWot7YhLA65+g4uYmhYR4i5RcwXA/2Gh0UpBGoM6xWWGP01XqGYha6yjiVPJG/ 8UGwQ6c26dvf+ft7ffIE7QKxi//2BnIbkwZojpXbfQzuXYEBA2wFG8h1os85jxK0gdOh 3m3A== X-Gm-Message-State: AGRZ1gLAwj+Fh3IYhft9xkFQRumx24SJbmh7aYXMO1NNpvhYAWCjuRiD L8hBsWBi1iZOk0bMKIhhxzAb0ktb2ZE= X-Google-Smtp-Source: AJdET5dOrpfE62ri6Z+r3qlTQ3+iN1dlCCdgCwct1MYZlUNG9ICUAFKqBkJ+YefXiKFKkle03NbrJA== X-Received: by 2002:a17:902:a717:: with SMTP id w23-v6mr16821354plq.24.1540867520082; Mon, 29 Oct 2018 19:45:20 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id h14-v6sm26154639pfn.80.2018.10.29.19.45.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 19:45:18 -0700 (PDT) Subject: Re: bug#30430: [column] accounting for ansi color codes To: 30430@debbugs.gnu.org References: <20180212060714.qwhalgz2z73a33da@E15-2016.optimum.net> <173746ce-56d0-b3de-3356-d331353b1693@draigBrady.com> From: Assaf Gordon Message-ID: Date: Mon, 29 Oct 2018 20:45:17 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <173746ce-56d0-b3de-3356-d331353b1693@draigBrady.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30430 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 30430 notabug close 30430 stop (triaging old bugs) On 2018-02-17 2:33 p.m., Pádraig Brady wrote: > On 11/02/18 22:07, Boruch Baum wrote: >> The `column -t' command doesn't align input properly when that input >> includes ansi color codes. >> > > Note column(1) is part of the util-linux project. > We've similar considerations though with wc -L > which we've at least mentioned at: > http://www.pixelbeat.org/docs/coreutils-gotchas.html#wc > Given the above, I'm closing this bug. -assaf From unknown Mon Jun 23 16:45:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Nov 2018 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator