Comment Don't use shell (Score 1, Troll) 360
When possible, avoid shell scripting: the language is flawed by design. Use a modern programming language, such as Python.
If you push the "extra ice" button on the soft drink vending machine, you won't get any ice. If you push the "no ice" button, you'll get ice, but no cup.