<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="/templates/2k11/rss.xsl" media="screen" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Daniel Lange's blog (Entries tagged as gnu)</title>
    <link>http://daniel-lange.com/</link>
    <description>agrep -pB IT /dev/life</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.6.0 - http://www.s9y.org/</generator>
    <pubDate>Sat, 06 Jan 2024 22:17:45 GMT</pubDate>

    <image>
    <url>//daniel-lange.com/uploads/Avatar_Blog_144_234.png</url>
    <title>RSS: Daniel Lange's blog - agrep -pB IT /dev/life</title>
    <link>http://daniel-lange.com/</link>
    <width>144</width>
    <height>234</height>
</image>

<item>
    <title>Getting gpg to import signatures again</title>
    <link>http://daniel-lange.com/archives/178-Getting-gpg-to-import-signatures-again.html</link>
            <category>Open Source</category>
    
    <comments>http://daniel-lange.com/archives/178-Getting-gpg-to-import-signatures-again.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=178</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=178</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;The GnuPG (gpg) ecosystem has been played with a bit in 2019 by adding fake signatures en masse to well known keys. The main result is that the SKS Keyserver network based on the &lt;a href=&quot;https://github.com/SKS-Keyserver/sks-keyserver&quot;&gt;OCaml software of the same name&lt;/a&gt; is basically history. A few other keyservers have come up like &lt;a href=&quot;https://gitlab.com/keys.openpgp.org/hagrid&quot;&gt;Hagrid&lt;/a&gt; (Rust) and &lt;a href=&quot;https://github.com/hockeypuck/hockeypuck&quot;&gt;Hockeypuck&lt;/a&gt; (Go) but there seems to be no clear winner yet. In case you missed it in 2019, see &lt;a href=&quot;http://daniel-lange.com/archives/159-Cleaning-a-broken-GnuPG-gpg-key.html&quot;&gt;my take on cleaning these polluted keys&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now the &lt;a href=&quot;https://dev.gnupg.org/rG23c978640812d123eaffd4108744bdfcf48f7c93&quot;&gt;changed defaults in gpg&lt;/a&gt; to &quot;mitigate&quot; this issue are trickling down to even the conservative distributions. Debian Bullseye has &lt;code&gt;self-sigs-only&lt;/code&gt; on gpg 2.2.27 and it looks like Debian Bookworm will get gpg 2.2.40. This would add &lt;code&gt;import-clean&lt;/code&gt; but Daniel Kahn Gillmor &lt;a href=&quot;https://sources.debian.org/src/gnupg2/2.2.40-1/debian/patches/gpg-drop-import-clean-from-default-keyserver-import-optio.patch/&quot;&gt;patched it out&lt;/a&gt;. He argues correctly that this new default could delete data from good locally stored pubkeys.&lt;/p&gt;

&lt;p&gt;This all ends in you getting some random combination of &lt;code&gt;self-sigs-only&lt;/code&gt; and / or &lt;code&gt;import-clean&lt;/code&gt; depending on which Linux distribution and version you happen to use.&lt;/p&gt;

&lt;p&gt;Better be explicit. I recommend to add:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# disable new gpg defaults&lt;/span&gt;&lt;br /&gt;keyserver-options no-self-sigs-only&lt;br /&gt;keyserver-options no-import-clean&lt;/div&gt;

&lt;p&gt;to your &lt;code&gt;~/.gnupg/gpg.conf&lt;/code&gt; to make sure you can manage signatures yourself and receive them from keyservers or local imports as intended.&lt;/p&gt;

&lt;p&gt;In case you care: See &lt;code&gt;info gnupg --index-search=keyserver-options&lt;/code&gt; for the fine documentation. Of course &lt;code&gt;apt install info&lt;/code&gt; first to be able to read info pages. &#039;cause who would still used them in 2023? Oh, wait...&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Mon, 27 Feb 2023 14:00:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/178-guid.html</guid>
    <category>defaults</category>
<category>gnu</category>
<category>gpg</category>
<category>keyserver</category>
<category>options</category>

</item>
<item>
    <title>The Stallman wars</title>
    <link>http://daniel-lange.com/archives/171-The-Stallman-wars.html</link>
            <category>Open Source</category>
    
    <comments>http://daniel-lange.com/archives/171-The-Stallman-wars.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=171</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=171</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;So, 2021 isn&#039;t bad enough yet, but don&#039;t despair, people are working to fix that:&lt;/p&gt;

&lt;p style=&quot;margin: 1.2cm; font-weight: bold;&quot;&gt;Welcome to the Stallman wars&lt;/p&gt;

&lt;p&gt;Team Cancel: &lt;a href=&quot;https://rms-open-letter.github.io/&quot;&gt;https://rms-open-letter.github.io/&lt;/a&gt; (&lt;a href=&quot;https://github.com/rms-open-letter/rms-open-letter.github.io/&quot;&gt;repo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Team Support: &lt;a href=&quot;https://rms-support-letter.github.io/&quot;&gt;https://rms-support-letter.github.io/&lt;/a&gt; (&lt;a href=&quot;https://github.com/rms-support-letter/rms-support-letter.github.io/&quot;&gt;repo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strike&gt;Current&lt;/strike&gt; Final stats are:&lt;/p&gt;

&lt;pre&gt;
Team Cancel:  3019 signers from 1415 individual commit authors
Team Support: 6853 signers from 5418 individual commit authors
&lt;/pre&gt;

&lt;p&gt;Git shortlog (Top 10):&lt;/p&gt;

&lt;pre&gt;
rms_cancel.git (Last update: 2021-08-16 00:11:15 (UTC))
  1230  Neil McGovern
   251  Joan Touzet
    99  Elana Hashman
    73  Molly de Blanc
    36  Shauna
    19  Juke
    18  Stefano Zacchiroli
    17  Alexey Mirages
    16  Devin Halladay
    14  Nader Jafari

rms_support.git (Last update: 2021-09-29 07:14:39 (UTC))
  1821  shenlebantongying
  1585  nukeop
  1560  Ivanq
  1057  Victor
   880  Job Bautista
   123  nekonee
   101  Victor Gridnevsky
    41  Patrick Spek
    25  Borys Kabakov
    17  KIM Taeyeob
&lt;/pre&gt;

&lt;p&gt;(data as of 2021-10-01)&lt;/p&gt;

&lt;p&gt;Technical info:&lt;br /&gt;
Signers are counted from their &quot;Signed / Individuals&quot; sections. Commits are counted with &lt;code&gt;git shortlog -s&lt;/code&gt;.&lt;br /&gt;
Team Cancel also has organizational signatures with Mozilla, Suse and X.Org being among the notable signatories.
The 16 original signers of the Cancel petition are added in their count.
Neil McGovern, Juke and shenlebantongying need &lt;code&gt;.mailmap&lt;/code&gt; support as they have committed with different names.&lt;/p&gt;

&lt;p&gt;Further reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An introductory &lt;a href=&quot;https://arstechnica.com/tech-policy/2021/03/free-software-advocates-seek-removal-of-richard-stallman-and-entire-fsf-board/&quot;&gt;Ars Technica article&lt;/a&gt; in case you wonder what this is all about.&lt;/li&gt;
&lt;li&gt;Debian vote mailing-list: &lt;a href=&quot;https://lists.debian.org/debian-vote/2021/03/maillist.html&quot;&gt;March 2021&lt;/a&gt;, &lt;a href=&quot;https://lists.debian.org/debian-vote/2021/04/maillist.html&quot;&gt;April 2021&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;NYT Magazine on the &lt;a href=&quot;https://www.nytimes.com/2020/12/03/t-magazine/cancel-culture-history.html&quot;&gt;history of cancel culture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Ed Santos&#039; &lt;a href=&quot;https://edsantos.eu/on-stalman/&quot;&gt;commentary and analysis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;12.04.2021 Statements from the accused&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.fsf.org/news/statement-of-fsf-board-on-election-of-richard-stallman&quot;&gt;Statement of the FSF board on the election&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.fsf.org/news/rms-addresses-the-free-software-community&quot;&gt;Statement of Richard Stallman&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;18.04.2021 Debian General Resolution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Debian General Resolution (GR) vote of the developers has concluded to not issue a public statement at all, see
&lt;a href=&quot;https://www.debian.org/vote/2021/vote_002#outcome&quot;&gt;https://www.debian.org/vote/2021/vote_002#outcome&lt;/a&gt; for the results.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It is better to keep quiet and seem ignorant than to speak up and remove all doubt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;See &lt;a href=&quot;https://quoteinvestigator.com/2010/05/17/remain-silent/&quot;&gt;Quote Investigator&lt;/a&gt; for the many people that rephrased these words over the centuries.
They still need to be recalled more often as too many people in the FLOSS community have forgotten about that wisdom...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;01.10.2021 Final stats&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It seems enough dust has settled on this unfortunate episode of mob activity now. Hence I stopped the cronjob that updated the stats above regularly. Team Support has kept adding signature all the time while Team Cancel gave up very soon after the FSF decided to stand with Mr. Stallman. So this battle was decided within two months. The stamina of the accused and determined support from some dissenting web devs trumped the orchestrated outrage of well known community figures and their publicity power this time. But history teaches us that does not mean the war is over. There will a the next opportunity to call for arms. And people will call. Unfortunately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;01.11.2024 Team Cancel is opening a new round; Team Support responds with exposing the author of &quot;The Stallman report&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hate to be right. Three years later than the above:&lt;/p&gt;

&lt;p&gt;An anonymous member of team Cancel has published &lt;a href=&quot;https://stallman-report.org/&quot; title=&quot;The Stallman report website&quot;&gt;https://stallman-report.org/&lt;/a&gt; &lt;a href=&quot;http://daniel-lange.com/media/2024-11-01_Stallman-report_mirror.pdf&quot;&gt;[local pdf mirror, 504kB]&lt;/a&gt; to &quot;justify our unqualified condemnation of Richard Stallman&quot;. It contains a detailed collection of quotes that are used to allege supporting (sexual) misconduct. The demand is again that Mr. Stallman &quot;step[s] down from all positions at the FSF and the GNU project&quot;. Addressing him: &quot;the scope and extent of your misconduct disqualifies you from formal positions of power within our community indefinitely&quot;.&lt;/p&gt;

&lt;p&gt;Team Support has not issues a rebuttal (yet?) but has instead identified the anonymous author as Drew &quot;sircmpwn&quot; DeVault, a gifted software developer, but also a vocal and controversial figure in the Open Source / Free Software space. Ironically quite similar to Richard &quot;rms&quot; Stallman. Their piece is published at &lt;a href=&quot;https://dmpwn.info/&quot; title=&quot;The DeVault report website&quot;&gt;https://dmpwn.info/&lt;/a&gt; &lt;a href=&quot;http://daniel-lange.com/media/2024-11-01_DeVault-report_mirror.pdf&quot;&gt;[local pdf mirror, 929kB]&lt;/a&gt;. They also allege a proximity of Mr. DeVault to questionable &quot;Lolita&quot; anime preferences and societal positions to disqualify him.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 26 Mar 2021 10:05:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/171-guid.html</guid>
    <category>fsf</category>
<category>gnu</category>
<category>politics</category>
<category>updated</category>

</item>
<item>
    <title>tail -S (truncating lines to terminal width)</title>
    <link>http://daniel-lange.com/archives/134-tail-S-truncating-lines-to-terminal-width.html</link>
            <category>Open Source</category>
    
    <comments>http://daniel-lange.com/archives/134-tail-S-truncating-lines-to-terminal-width.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=134</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=134</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;The tail command has a quite glaring omission in that it can&#039;t truncate lines.
Thus it wraps long log line into multiple terminal lines regardless. Which makes them very hard to read.&lt;/p&gt;

&lt;p&gt;I used to work around this using &lt;code&gt;less -S&lt;/code&gt; and then hitting the &lt;tt&gt;[F]&lt;/tt&gt; key but that&#039;s interactive. &lt;code&gt;less +F &amp;lt;filename&amp;gt;&lt;/code&gt; is the little known work-around for the interactive issue but that still doesn&#039;t work well with pipes (&lt;code&gt;tail -f logfile | grep &quot;ERROR:&quot;&lt;/code&gt; etc).&lt;/p&gt;

&lt;p&gt;There is a &lt;a href=&quot;https://lists.gnu.org/archive/html/bug-coreutils/2004-12/msg00068.html&quot;&gt;bug report from 2004&lt;/a&gt; against GNU coreutils but that went nowhere.&lt;/p&gt;

&lt;p&gt;So we&#039;re not getting a &lt;code&gt;tail -S&lt;/code&gt; anytime soon.&lt;/p&gt;

&lt;h3&gt;Bash to the rescue: tail -S → tails&lt;/h3&gt;

&lt;p&gt;Hence I wrote this little script, &lt;a href=&quot;http://daniel-lange.com/software/tails&quot; title=&quot;Download the tails script&quot;&gt;&lt;strong&gt;tails&lt;/strong&gt;&lt;/a&gt; [1kB]:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;#!/bin/bash -i&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# v2 from 170712: introduce loop to work around GNU coreutils issues with pipe/fifo/isatty&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-z&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #007800;&quot;&gt;$COLUMNS&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt; ; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #007800;&quot;&gt;MYCOL&lt;/span&gt;=$&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;tput cols&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #007800;&quot;&gt;MYCOL&lt;/span&gt;=&lt;span style=&quot;color: #800000;&quot;&gt;${COLUMNS}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;tail&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;read&lt;/span&gt; line; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #007800;&quot;&gt;$line&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; expand &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cut&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-c1-&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;${MYCOL:-80}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;done&lt;/span&gt;﻿&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;

&lt;p&gt;Now, there are some interesting bits even in this tiny script:&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;bash -i&lt;/code&gt; results in &lt;code&gt;$COLUMNS&lt;/code&gt; being set within the script on sane Linux bash. Otherwise that variable wouldn&#039;t be available. Because it is a shell variable and not an environment variable. You knew that, right?&lt;/p&gt;

&lt;p&gt;Unfortunately the &lt;code&gt;bash -i&lt;/code&gt; doesn&#039;t get &lt;code&gt;$COLUMNS&lt;/code&gt; set on either MacOS (X) or FreeBSD, so that&#039;s where the &lt;code&gt;tput cols&lt;/code&gt; comes into play. It outputs the column width for the current terminal to stdout.&lt;/p&gt;

&lt;p&gt;If all that fails &lt;strong&gt;tails&lt;/strong&gt; will default to 80 columns.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;tails -f /var/log/apache/access.log&lt;/code&gt; will now look nice.&lt;/p&gt;

&lt;h3&gt;Corner case: color&lt;/h3&gt;

&lt;p&gt;If you use color codes somewhere (&lt;code&gt;grep --color=always&lt;/code&gt;, &lt;code&gt;dmesg --color=always&lt;/code&gt;) &lt;strong&gt;tails&lt;/strong&gt; will just truncate lines too short so they will still not wrap.&lt;br /&gt;
There is a slight risk that it may cut into half a color code escape sequence and mess up the terminal a bit.
You could change that by removing the &lt;code&gt;-i&lt;/code&gt; from the shebang line and setting $COLUMNS explicitly. But that then needs manual adjustment for each combination of colored lines (=count of ANSI sequences) and terminal width. Better to color after the &lt;strong&gt;tails&lt;/strong&gt; invocation then where possible, e.g. &lt;code&gt;tails -f /var/log/httpd/error.log | grep &#039;:error&#039;&lt;/code&gt; to watch for PHP errors and the like.&lt;/p&gt;

&lt;h3&gt;Mended corner cases: inconsistent tail behaviour&lt;/h3&gt;

&lt;p&gt;A first version of the script didn&#039;t use a loop but just had&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;tail&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; expand &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cut&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-c1-&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;${MYCOL:-80}&lt;/span&gt;﻿&lt;/div&gt;

&lt;p&gt;This would break &lt;code&gt;tails -f&lt;/code&gt; on Debian (coreutils 8.23) / Ubuntu (coreutils 8.26) while removing the &lt;code&gt;|expand&lt;/code&gt; would make it work. On Fedora 25 (coreutils 8.25) I couldn&#039;t get &lt;code&gt;tails -f&lt;/code&gt; to work at all with that v1. The &lt;code&gt;cut&lt;/code&gt; (so just a single command chained) already broke the pipe &lt;img src=&quot;http://daniel-lange.com/plugins/serendipity_event_emoticate/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; class=&quot;emoticon&quot; /&gt;. And nope, &lt;code&gt;stdbuf&lt;/code&gt; didn&#039;t help.&lt;/p&gt;

&lt;p&gt;If you have a more simple solution to work around the isatty / isfifo mess, please leave a comment!&lt;/p&gt;

&lt;h3&gt;Alternatives&lt;/h3&gt;

&lt;p&gt;If you want to show multiple log tails in parallel, highlight strings etc. &lt;a href=&quot;https://www.vanheusden.com/multitail/&quot;&gt;multitail&lt;/a&gt; is worth a look.&lt;/p&gt;

&lt;p&gt;Depending on what you want to achieve you could also tell your terminal emulator to not wrap lines:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;setterm&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-linewrap&lt;/span&gt; off; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;less&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-SR&lt;/span&gt; +F &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;var&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;log&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;apache&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;access.log; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;setterm&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-linewrap&lt;/span&gt; on&lt;/div&gt;
 
    </content:encoded>

    <pubDate>Wed, 12 Jul 2017 08:08:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/134-guid.html</guid>
    <category>bash</category>
<category>coreutils</category>
<category>gnu</category>
<category>script</category>
<category>tail</category>
<category>terminal</category>

</item>

</channel>
</rss>
