[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cat builtin should fail on directory?
From: |
Peng Yu |
Subject: |
Re: cat builtin should fail on directory? |
Date: |
Sat, 8 May 2021 16:53:24 -0500 |
$ type -a cat
cat is a shell builtin
cat is /usr/local/opt/coreutils/libexec/gnubin/cat
cat is /bin/cat
On 5/8/21, Chris F.A. Johnson <chris@cfajohnson.com> wrote:
> On Sat, 8 May 2021, Peng Yu wrote:
>
>> Hi,
>>
>> The following cat command just hangs and is not responsive to ctrl-C.
>> Is it a bug? Thanks.
>>
>> $ help cat
>> cat: cat [-] [file ...]
>> Display files.
>>
>> Read each FILE and display it on the standard output. If any
>> FILE is `-' or if no FILE argument is given, the standard input
>> is read.
>> $ cat .
>
> $ cat .
> cat: .: Is a directory
>
> What is the output of "type cat"?
>
> $ type -a cat
> cat is /bin/cat
>
>
> --
> Chris F.A. Johnson <http://cfajohnson.com/>
> =========================== Author: ===============================
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
> Pro Bash Programming: Scripting the GNU/Linux shell (2009, Apress)
>
>
--
Regards,
Peng