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


#1

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
and
$ 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.


#2

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