GNU bug report logs -
#17384
"bug" in the Unix "cat" command
Previous Next
Reported by: Peter Rowat <peter <at> pelican.ucsd.edu>
Date: Thu, 1 May 2014 19:12:02 UTC
Severity: normal
Tags: notabug
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 17384 <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 10 years and 356 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.