URL:
  <https://savannah.gnu.org/bugs/?66923>

                 Summary: Manual states that $(cat x) and $(< x) being
equivalent not strictly true
                   Group: The GNU Bourne-Again SHell
               Submitter: None
               Submitted: Tue 18 Mar 2025 01:30:06 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 18 Mar 2025 01:30:06 PM UTC By: Anonymous
Quote:

```
The command  substitution $(cat file) can be replaced by the equivalent but
faster $(< file).
```

This is not true in one case that can lead to missing an error, namely if you
try to read a directory, cat will fail but < will succeed. Compare:

v=$(< /)
v=$(cat /)







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66923>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to