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
  • This question has been answered here: stackoverflow.com/questions/35586627/… Commented Mar 23, 2016 at 1:04
  • 1
    Escaping quotes makes them data, not syntax. Unless you literally want quotation marks to be treated as data by the open command (which, I promise you, you don't), you don't want to escape the quotes. Instead, you should escape the expansion. Commented Mar 23, 2016 at 1:07
  • 1
    @theman, it does what you ask for; that's just not what you want. It escapes the quotes, which is what you're asking how to do, but if you want open to work correctly, then those quotes shouldn't be escaped. Commented Mar 23, 2016 at 1:08
  • 1
    BTW, if you want automated checking for this kind of error, see shellcheck.net Commented Mar 23, 2016 at 1:14