ahh

~$ which cat
  • dan@upvote.au
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    6 hours ago

    Admittedly I still use cat for this.

    This also works too, but it’s more verbose:

    echo "$(<foo.txt)"
    

    It’s mentioned in the Bash man pages:

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