If you're going to nitpick a strawman this hard, you have to say this whole command should just be replaced with "tail file" but presumably the author intended it as an example where in real life there would be options supplied to sed. Those options might cause the number of lines to change, necessitating the tail being after the sed, not before the sed.
God, I wasn't nitpicking -- I even said my comment was off-topic. I was throwing advice into the void, for the author if they read it or the commenters here.
And it's fairly important stuff for me on a regular basis. At work we generate hundreds of gigs of logs daily, and doing things in the right order with tail and grep etc is often the difference between a script working or not, or between it taking seconds and taking minutes.
cat helps with readability, as in having the input at the start. It's premature optimization to complain about it, I'm quite sure any performance difference is negligible.
Quite beside the point, but:
- You don't want to use `cat`, and
- You probably want to pipe `tail` into `sed`, not the other way around.
This will be substantially faster if `file` is large, because it lets `tail` be clever about how it finds the last ten lines.