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.