I'm learning about expansion/ command substitution, and while paying around with an example, noticed that these two commands have different results.
For example, if I cd into
/usr/bin, and run
ls | grep zip, grep picks up "zip" in the file names only.
But when I run
grep zip $(ls) in the same directory, grep also picks up zip in the file content. Why? Ubuntu 16.04.
I know it's a newbie question, but it would still be helpful to know why. Thanks.