Lists. Need a bit of help

Worse than that, you didn't have the pipe (|) at all.

You might like to work through this excellent tutorial in the "Learn Enough to be Dangerous" series (which are excellent and free to use online). With some basic understanding of how the command line works such mistakes become much less likely.
Learn Enough Command Line to be Dangerous