Unix trivia: echo cat | sed statement

I occasionally run into weird, funny or surprising aspects of Unix and Unix-like Operating Systems. I'll try to post about those regularly because they're fun.

This one popped up on irc a few weeks ago; a google search suggests it's at least 6 months old. I have been unable to track the original source down.

The question is: if you input echo cat | sed statement into your Unix shell, what comes out? Can you predict it? If not, can you try it and then explain it?

blogroll

social