6.2/13 "$ cat volcanoes.txt | wc | cat > islands.txt" -conception

So I get that the contents of volcanoes.txt are piped into wc but why is it piped into cat? It seems redundant because wc will already have and output which will overwrite islands.txt.

Is there a difference between
$ cat volcanoes.txt | wc | cat > islands.txt
$ cat volcanoes.txt | wc > islands.txt

I tried both and both yield the same result. I just want to understand the conceptual difference I suppose.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.