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*

3
  • These examples are OK only when the variables will never contain user input, as globbing will still be done. Commented Nov 18, 2016 at 10:42
  • @Muzer or when you really want the user input to be globbed (I don't have an example for that to hand as usually I expect the shell to handle that before my code sees it). I might put my last sentence in bold to emphasise it. Commented Nov 18, 2016 at 10:57
  • Indeed. I guess the case where you're interactively reading in something that the user expects to be interpreted with normal shell semantics. Maybe if you're writing a shell in bash? :D (Though will that work with things like quoting filenames/escaping spaces? I haven't actually tried that) EDIT: Just tried, no it doesn't :( Commented Nov 18, 2016 at 11:09