bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17384: "bug" in the Unix "cat" command


From: Bernhard Voelker
Subject: bug#17384: "bug" in the Unix "cat" command
Date: Fri, 02 May 2014 15:16:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

tags 17384 notabug
close 17384
stop

On 05/01/2014 10:52 PM, Bernhard Voelker wrote:
If the output file had previously existed (so that the file name
globbing would let it match the pattern), then cat(1) would have
complained:

   $ src/cat isi.*.02p0 >isi.Rall.0400.02p0
   src/cat: isi.Rall.0400.02p0: input file is output file

That means that on your system
a) the shell opened the output file before doing the pattern matching,
and b) cat(1) was unable to detect that the output file is the same
as the input file.
As that check is included in GNU coreutils' cat(1) since day one,
this issue is not a matter of an outdated version of cat(1).

What system are you using (OS, file system type, shell, shell version,
and finally 'cat --version')?

As confirmed in private email, the system was "Mac OS X 10.9.2 (Mavericks)"
... and the OP was using the Apple version of 'cat'.
I'm therefore marking this as not a bug and closing it.

Have a nice day,
Berny







reply via email to

[Prev in Thread] Current Thread [Next in Thread]