Although this is a basic stuff, but still i wonder. Consider these two examples.
[root@dhcppc0 practice]# cat file1 > wc -l cat: invalid option -- l Try `cat --help' for more information.
[root@dhcppc0 practice]# cat file1 | wc -l 7
I wonder, why doesn't redirection work in first case? when to use redirect and when to use pipes? I have been Linux for a long time, but still this basic stuff baffles me.