How shells call other programs

An article about How Linux or UNIX Understand which program to run got picked up by a few dozen RSS feeds recently. It's not a bad article.

It's actually slightly incorrect though.

The implication is that the shell reads the command and decides what to do. It's actually the kernel that makes a lot of the decisions.
For example, when you type "date", the shell looks through its PATH, finds /bin/date, but then immediately execs it: the kernel loads and runs "date".

You can see that if you run bash with strace and then give it various commands. When you type "date", for example, the shell goes looking in its PATH:

Full Article.