Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15069

Re: command "cat /etc/localtime" breaks output on tty-terminal

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Dennis Williamson <dennistwilliamson@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: command "cat /etc/localtime" breaks output on tty-terminal
Date Sun, 23 Jun 2019 07:29:37 -0500
Lines 70
Approved bug-bash@gnu.org
Message-ID <mailman.777.1561292995.10840.bug-bash@gnu.org> (permalink)
References <20190623123102.fa9221e067faed8874ea7fc2@gmx.de> <CANaoh6++Y25Ug+TKww3+WvbvOer8=jpGLLZohwWUyjvoBRFUrQ@mail.gmail.com> <20190623141810.d3ba78fb13821008b401f45f@gmx.de> <CANaoh6+R0ADC3xdFkJVbak2qF6iyT4DCLwhX_Qp25m2gh2sOrA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1561292996 8398 209.51.188.17 (23 Jun 2019 12:29:56 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash <bug-bash@gnu.org>
To bitfreak25 <bitfreak25@gmx.de>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5wtrUWuTf4rIuxVsfRoDclXGf9HedeINgHvBEZG+HaA=; b=jQwTZHWP8hEGToClN0YO3Em+gX/ZnqIu7lPX+12wg+28wa8y/z/rryPwd3CkpwDLLO bpZjQf4EeYSgF3W+//nFC/ZfVDgDlQxIGXl9KHVP526ZT/mvteFN3Gk+fevlU6Apr4Ce YRIH0pYV4QcCwnAoGfYaAAJBIeUh5n+EAAdArPZiCPuuLrSznyGcCkrYsmqqeGvDg7+o Brl2DK1JRRT+A1lfWAx5CkSHPKH5weYX+8OM7V135Uldv4rXTtSow1sB5yuqVLycGATz 1QfwmkuXQrpQVxN2YHcyFztc0QgywWvRiscoEt7zb/wVv3JN5FTG5grTyxLMP311082i YFsw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5wtrUWuTf4rIuxVsfRoDclXGf9HedeINgHvBEZG+HaA=; b=LnUXQo4qWxyBTISIlCaO/Uq/uqRZobffVra6qBoQhdOjbkruBVfnd4X4t6HBhh85Uw TKLFC0WHjZIA1s29EavljCN8HRVY94HVi1EVTk5jKDqrAjVAiAoTaT+vcS5qsGCsCNRk 7rH/SQAUQ16bgzaQ7ft+vlLBBb1aJjTbW6gcU6Bel1yX7bez0k8P56scLljCPhB+kW2y Ug2hy9+I09IILFkGRJgleWTl8dPwGmktYlbyQ/bhY1ZQbHAyEnhBTwr/6iyOHiZ21sdp wacjqzkgx3Uc1VT3DCUKqrDsVYqLXLD+DodCazXtHwi0nkJfN3KqaZWc/nyMn0s3NhSB 7H1Q==
X-Gm-Message-State APjAAAV95805xp6/kwvlkTQJLuEQTyCgE9+C4wk3jxxCw+/N/6O5M28u S45xc0MwMd1CAAE4E0Kv98TVrHmNMKrO8qApGA==
X-Google-Smtp-Source APXvYqxkllt/rT/MKdUd7Iv57u0ALL0dXYxVeRd7vr5Ez1nZx60Cico5Mqb000aoI6+SLb5V/JkDNUuatnLKlwwsh3c=
X-Received by 2002:a5d:4008:: with SMTP id n8mr44384090wrp.353.1561292989896; Sun, 23 Jun 2019 05:29:49 -0700 (PDT)
In-Reply-To <20190623141810.d3ba78fb13821008b401f45f@gmx.de>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2a00:1450:4864:20::441
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CANaoh6+R0ADC3xdFkJVbak2qF6iyT4DCLwhX_Qp25m2gh2sOrA@mail.gmail.com>
X-Mailman-Original-References <20190623123102.fa9221e067faed8874ea7fc2@gmx.de> <CANaoh6++Y25Ug+TKww3+WvbvOer8=jpGLLZohwWUyjvoBRFUrQ@mail.gmail.com> <20190623141810.d3ba78fb13821008b401f45f@gmx.de>
Xref csiph.com gnu.bash.bug:15069

Show key headers only | View raw


On Sun, Jun 23, 2019, 7:18 AM bitfreak25 <bitfreak25@gmx.de> wrote:

> On Sun, 23 Jun 2019 06:04:29 -0500
> Dennis Williamson <dennistwilliamson@gmail.com> wrote:
>
> > On Sun, Jun 23, 2019, 5:31 AM bitfreak25 <bitfreak25@gmx.de> wrote:
> >
> > > OS: Arch Linux 5.1.12-arch1-1-ARCH (tty1)
> > > Bash-Version: 5.0.7(1)-release
> > > localization: de_DE.UTF-8 UTF-8
> > > keymap: de-latin1-nodeadkeys
> > >
> > > Description:
> > > The command "cat /etc/localtime" was called in a tty-terminal. After
> that
> > > some characters will be printed incorrectly (mostly "cyrillic" chars
> > > instead of the correct ones). The typed chars seems to be handled
> correctly
> > > (e.g. calling "exit") but the output is broken at this point. This
> > > behaviour is reproducible on my other PC with Debian Stable
> (Bash-Version
> > > in Debian: 4.4-5), so it seems to be a old bug. Changing to another
> tty or
> > > rebooting the OS will fix this behaviour until the command is called
> again.
> > >
> > > Kind regards,
> > > bitfreak
> > >
> > >
> >
> >
> > /etc/localtime is symlinked to a file that contains time zone data. If
> you
> > enter the command
> >
> > file -L /etc/localtime
> >
> > you'll see that that's the case. It contains data that's not meant to be
> > displayed including control characters which cause the effect you
> observed.
> > If you cat any so-called binary file such as this you are likely to see
> the
> > same kind of thing happen. Entering the
> >
> > reset
> >
> > command in the affected terminal will correct the problem after it
> occurs.
>
> I kind of thought that this could be the reason. It also happens with
> "cat /dev/urandom" which is stopped by [STRG] + [C].
>
> It seems to be a very small bug thats only breaks the output with an
> unusual command and there are already 3 workarounds. But in my opinion
> it should be fixed some time as it isn't the correct behaviour like
> doing it with a gui-terminal e.g. xfce4-terminal.
>
> Kind regards,
> bitfreak
>


It's not a bug. It's expected behavior. If a useful sequence of control
characters is output - useful things happen. If you take that away then
lots of stuff doesn't work.

Solution? Don't cat non-text files to the terminal.

>

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: command "cat /etc/localtime" breaks output on tty-terminal Dennis Williamson <dennistwilliamson@gmail.com> - 2019-06-23 07:29 -0500

csiph-web