On Thu, Feb 6, 2020 at 2:37 PM Kevin Adler <kadler@xxxxxxxxxx> wrote:

In Bourne shell, you can use single quotes inside double quotes just fine.
You can use double quotes inside single quotes just fine. It is impossible
to put single quotes inside single quoted strings, but you can put double
quotes inside double quoted strings by using a backslash before the
embedde double quote to escape it (similar to C/C++/Java/etc)

Ah! I am very happy to have been wrong on this one!

After my backslash attempts failed for single-quotes, I did not think
to try them for double-quotes.

So you would need to do two levels of escaping to deal with the fact that
you're calling the string through QSH through CL and have to deal with
both of their differences. Not fun, but doable.

Not exactly "fun"; but not exactly hard either, for this particular
use case. Since double-quoted strings can accommodate both single- and
double-quote literals, I can simply *always* use double-quotes around
my parameters destined for Python.

Thanks!

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.