I'm reading about "redirection of input" on the internet. I understand what's behind it. For example:
command < file.ext
This is equivalent to:
command 0< file.ext
In general, if you have:
command n< file.ext
then the contents of file.ext go to file descriptor "n" as input. I've checked different websites explaining "input redirection". However, the problem is that I didn't see any good example. I'll discuss some examples I saw:
cat < file.txt
Then I'm thinking, "cat file.txt" does the same, so why do we need it? Another example:
sort < file_list.txt > sorted_file_list.txt
Then I'm thinking, "sort file_list.txt > sorted_file_list.txt" does the same, so why do we need it? Another example:
more < /etc/passwd
Then I'm thinking, "more /etc/passwd" does the same, so why do we need it? That's why these are not really good examples in my opinion. What is a good example to explain the purpose of input redirection in a terminal-window?
Probably internally something like "cat file.txt" is being treated as "cat 0< file.txt" (input redirection), but in a terminal-window ... when it really does make sense to use an "input redirection" in a terminal-window? Does someone have a good example?