Studying Module 5 and Chapters 18 and 19 of the Das book, you discovered different ways of starting the execution of a shell script, and also learned that there are various situations when a new execution of the Shell itself is required (or desired.)
Please study these aspects as systematically as you can, and comment on your findings.
Theresa L. Ford on 04-19-2004
This response has been published in the May issue of the Linux Gazette at http://linuxgazette.net/102/ford.html. The original version is below.
I think of the different shells as clones of little worker guys. sh drinks beer, sports a nice beer belly, and is quite content to do what you ask him to. bash drinks beer AND smokes cigars. ksh is an outdoor barbeque type who likes food and sports with whatever drink is handy. csh only drinks dry martinis and has a dark sense of humor. Each of these worker types speaks a slightly different dialect and gets confused if you offer him beer when he distinctly requires a dry martini. Each has his own unique DNA (sometimes referred to as initialization scripts).
You can change which shell worker type you want to order around on a routine basis using a magic wand, etched with the word 'chsh', to point at the one you want to come running first. This doesn't limit you, though, because you can always clone a new one of any type by saying his name. The conscriptions of new workers can even be done inside files using a #! whip.
Each worker does his job at a minimum wage of $0, but may require some training and additional $'s, maybe 1-9, and will tell you how much you gave as a simple $#. If you overpay him, you might have to shift his wages a little. Sometimes, the worker can be paid in special loot like gems, $* (equivalent to all given), or $@ (also equivalent to all given but requires that the worker spend proceeds only after careful consideration of all estimate quotes).
Additionally, each worker operates under specific user permissions and may have problems if you tell him to do something he isn't allowed to do. He has a distinct personality and only sometimes likes to interact with you; in fact, these workers can hide from you in the background (sly buggers, these shells!) or let you watch them operate.
Each worker can request another worker clone (of any installed type), called its child, through a process named 'spawning'. He can learn a specialized vocabulary (if you define each new word as a variable) and is even capable of sharing its vocabulary with its children, but only if you specifically tell him to! Though he'll forget some of his words if you unsettle him.
If you give him enough $$, he'll tell you who he is. If he's hiding, you have to shout ($!) to get his attention so he'll tell you who he is. You can ask him a question ($?) and he will tell you how he did at his task. In all, I think I shall name all my shell worker clones "Westley", call them "Farm Boy", and expect them to respond, "As you wish..."