For the Love of All That's Holy, Use CCL to Control Complexity in Your Systems
danielbmarkham.com
danielbmarkham.com
- It swallows extra spaces between the arguments.
- If the first argument starts with a hyphen the behaviour is implementation-dependent.
- In Bash, if there's an exclamation mark anywhere except the last character of any argument Bash tries to do event lookup instead of treating the string as a literal.
More fun examples at https://unix.stackexchange.com/q/65803/3645.
I would trust the second piece of code much more than the first, despite the complexity.