Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Both of these are really bad, because shell globbing is still applied. Try making one of your array elements an asterisk. Commented Nov 18, 2016 at 10:41
  • @Muzer sure, globbing is still applied. That's one of the things you have to keep in mind when using shells, and if you're writing actual script, then checks should be made. This is just a simple approach to creating array out of a one whole string, and I'm not going whole 9 yards here. Ease up on judgement :) Commented Nov 18, 2016 at 10:46
  • The whole reason you use quotes is because you want to go the whole 9 yards in terms of making your program robust against unexpected input. Not going the whole 9 yards is the way security bugs appear in software... Commented Nov 18, 2016 at 10:48
  • 1
    @Muzer This particular question asks "When quoting is not desirable?" , and I am giving specific answer - when we do want word splitting to occur. Nobody is questioning the need for quotes in other situations Commented Nov 18, 2016 at 10:52