0

I am trying to combine the results of a command and a here string like this:

cat <(echo first) <<< second

I am getting this output:

first

Instead of

first
second

Why?

codeforester
  • 39,467
  • 16
  • 112
  • 140

1 Answers1

2

From man cat:

With no FILE, or when FILE is -, read standard input.

But with file different then -, standard input is not read.

I guess you'll want:

cat <(echo first) - <<<second
KamilCuk
  • 120,984
  • 8
  • 59
  • 111