I am looking at how to print a file over ssh. Two websites (The Linux Documentation Project and Computer Hope) suggest the command "lpr" but both seem to suggest two different methods, with no obvious reason why they are different or which should be used in different circumstances.
cat <filename> | lpr
I understand that option 1 simply prints the file, whereas option 2 uses cat to read the file and pipes it to lpr which then prints it, but why is that useful? In what cases should I use one or the other or are they totally equivalent? (If so, surely option 1 is better as it takes less typing...)