01 / 07
From the return key to the running
What this chapter has said three times now gathers into one thread.
> The shell rewrites the characters before it runs the command
And the rewriting has an order. Roughly, this is the flow.
1. turn ~ into the home place tilde expansion2. turn $name into the contents variable expansion3. turn $(...) into its output command substitution4. turn $((...)) into the result arithmetic expansion5. split on spaces word splitting6. turn * ? [] into file names globbing7. take off the quotes quote removal8. hand the finished list to the commandIt looks like a lot, but the only order to learn is 2, then 5, then 6. Every accident of the last lessons is in there.
split on spaces after expanding the variable -> hence "$F"expand the * after the splitting -> hence a * inside a variable expands tooKnow the order and you can predict the result. Predict it and you can stop before something dangerous. That is what this lesson is for.