ahh

~$ which cat
you are viewing a single comment's thread
view the rest of the comments
[–] 13 points 6 days ago* (last edited 6 days ago) (1 child)

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).

EDIT: I was just informed that simply <foo.txt works too.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 6 days ago (1 child)

    how in the world is this not a useless use of echo and equivalent to <foo.txt

  • source
  • parent
  • hideshow 2 child comments