Is this cat command necessary in this situation?

This is where i am at, at the moment: https://www.codecademy.com/courses/learn-the-command-line/lessons/redirection/exercises/redirect-sort

On the last example, it shows us this command "$ cat glaciers.txt | sort > sorted-glaciers.txt ".
What i am wondering is, if the cat command is necessary. Isn’t it used to read files? Typing this whole command in, doesn’t even print out anything. Could anyone help me understand why? :grin:

In order to pipe to sort, the stream needs to be open and the file read in.

1 Like

Thank you for the answer :grinning:

1 Like