Bug#873476: coreutils: /bin/cat doesnt display a line of a txt file without an end of line [shell prompt problem]

2017-08-29 Thread Jean-Luc Coulon


Le 29/08/2017 à 00:51, Bob Proulx a écrit :

I was confused because this file used to be "displayable" with the cat
command (which is very handy to do this kind of thing).


I can guess that your prompt has probably gotten fancier.  But
regardless this is a good thing to find anyway.  Because shouldn't
that troublesome VERSION file have a newline at the end?  Sounds like
a worthwhile task to go poke at on that project.


The program (namely displaycal: https://displaycal.net/) is not written 
specifically for Linux and not on a Linux system.


This is a Python program and the author uses MS Windows (c) (r) with 
"some" EDI.


Probably this file is used to concatenate (!) it with other files (there 
is also a VERSION_BASE file) and this is used internally by the program 
at build time.


Regards

Jean-Luc



Bug#873476: coreutils: /bin/cat doesnt display a line of a txt file without an end of line [shell prompt problem]

2017-08-28 Thread Bob Proulx
Hello Jean-Luc,

Jean-Luc Coulon wrote:
> Thank you for the clear and detailed informations.

You are most welcome.  I know it was a confusing case.

> Yes, *I* use cat (display a file on a terminal) as you said since... well...
> maybe 1976 ;) But in these years, the standard output was a belt printer.

I started sometime around 1980 on a Honeywell with paper terinals.
Well...  Probably earlier on a Radio Shack TRS-80 which I could play
with at the local store.  It took a couple of more years before I
encountered my first Unix system.  But I have been here ever since!

> And yes, the culprit was the prompt. I'm using zsh with a fancy prompt.
> Switching to a basic prompt solved the problem.

I was confident that was the problem. :-)

> I was confused because this file used to be "displayable" with the cat
> command (which is very handy to do this kind of thing).

I can guess that your prompt has probably gotten fancier.  But
regardless this is a good thing to find anyway.  Because shouldn't
that troublesome VERSION file have a newline at the end?  Sounds like
a worthwhile task to go poke at on that project.

> For those interested in, the manpage of the 1st edition of UNIX manual was
> saying:
> 
> 11/3/71   CAT (I)
> NAME cat -- concatenate and print
> SYNOPSIS cat file1 ...
> DESCRIPTION  cat reads each file in sequence and writes it on
> the standard output stream.  Thus:
> cat file
> is about the easiest way to print a file.  Also:
> cat file1 file2 >file3
> is about the easiest way to concatenate files.
> If no input file is given cat_ reads from the
> standard input
> 
> So there are some excuses using cat as a "way to print a file".

Yes.  I didn't want to mention the man page for it because of that
text mentioning "printing".  But I think it is actually incorrect as
soon as paper printing terminals were replaced with CRT terminals.
Back in the days when everyone used a teletype or the later paper
terminals then using cat to emit a file to the terminal does print it
because the terminal was a paper terminal.  But as soon as CRTs came
along I think that documentation became incorrect because on a CRT
emitting the file to the terminal no longer printed it.  But without a
real pressing need to change the documentation it still stands all of
the way to this day regardless of the lack of anyone having seen a
paper terminal in many years.

But you have forgotten the other venerable claim for using 'cat' as
well.  It has often been claimed that a Unix wizard is one that among
other things writes device drivers with cat redirected from the
terminal. :-)

Bob



Bug#873476: coreutils: /bin/cat doesnt display a line of a txt file without an end of line [shell prompt problem]

2017-08-28 Thread Jean-Luc Coulon

Hi Bob,

Thank you for the clear and detailed informations.

Yes, *I* use cat (display a file on a terminal) as you said since... 
well... maybe 1976 ;) But in these years, the standard output was a belt 
printer.


And yes, the culprit was the prompt. I'm using zsh with a fancy prompt.
Switching to a basic prompt solved the problem.

I was confused because this file used to be "displayable" with the cat 
command (which is very handy to do this kind of thing).


For those interested in, the manpage of the 1st edition of UNIX manual 
was saying:


11/3/71   CAT (I)
NAME cat -- concatenate and print
SYNOPSIS cat file1 ...
DESCRIPTION  cat reads each file in sequence and writes it on
the standard output stream.  Thus:
cat file
is about the easiest way to print a file.  Also:
cat file1 file2 >file3
is about the easiest way to concatenate files.
If no input file is given cat_ reads from the
standard input

So there are some excuses using cat as a "way to print a file".

Thanks and regards

Jean-Luc



Bug#873476: coreutils: /bin/cat doesnt display a line of a txt file without an end of line

2017-08-28 Thread Dominik George
Hi,

> I've a "VERSION" file for a package (not from debian) and this file doesnt 
> have a 0x0A at the end of the line.
> cat doesnt display any contents (less does).
> If I add lines before the offending line, these lines are displayed but not 
> the last one.
> 
> Attached: the VERSION file which contain a single line and the TXT file which 
> contains 2 lines, the second one without a 0x0A.

Your file is not a text file and it does not contain such a thing as a line.

POSOX3.206 Line
A sequence of zero or more non-  characters plus a terminating 
 character.

I also cannot reproduce your bug. Maybe you can post a screen dump?

-nik



Bug#873476: coreutils: /bin/cat doesnt display a line of a txt file without an end of line

2017-08-28 Thread Jean-Luc Coulon (f5ibh)
Package: coreutils
Version: 8.26-3
Severity: normal

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I've a "VERSION" file for a package (not from debian) and this file doesnt have 
a 0x0A at the end of the line.
cat doesnt display any contents (less does).
If I add lines before the offending line, these lines are displayed but not the 
last one.

Attached: the VERSION file which contain a single line and the TXT file which 
contains 2 lines, the second one without a 0x0A.

Regards 

Jean-Luc 

- -- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'buildd-unstable'), (500, 'testing'), 
(1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.13.0-rc6-i7-0.1 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages coreutils depends on:
ii  libacl1  2.2.52-3+b1
ii  libattr1 1:2.4.47-2+b2
ii  libc62.24-17
ii  libselinux1  2.7~rc2-1

coreutils recommends no packages.

coreutils suggests no packages.

- -- no debconf information

-BEGIN PGP SIGNATURE-

iF0EARECAB0WIQT5el3FKLtmYO4UlQtR0YZfPMac0AUCWaPJZAAKCRBR0YZfPMac
0BWZAKCK88N2/n4tTEEeKyc+jhRklVxjXQCgnnZ/4iZ3Hv8YSuTHFZemtx4lUJg=
=knZs
-END PGP SIGNATURE-
3.3.7.2first line
second line