Artyom Bologov <[email protected]> writes:

>> Okay, but what about the quoting implementation?
>> Is wrapping in single quotes sufficient?
>
> Single quotes don’t allow single quote inside
> them.  So it has to be double quotes + more
> complex escaping.

        I usually  escape with single  quotes, after
  replacing every single quote in the file name with
  the following incantation:

        '"'"'

        This ends the previous single-quoted string,
  then starts a double-quoting one in which there is
  only a single  quote, end that one,  then starts a
  new single-quoting  string.  This is  the simplest
  POSIX shell quoting method I know of.  An example,
  the raw name:

        John's $$$ "Document".txt

  Becomes:

        'John'"'"'s $$$ "Document".txt'


Best Regards,
Lumin Etherlight

Reply via email to