posixQuote function

String posixQuote(
  1. String s
)

s single-quoted for a POSIX shell (it's → 'it'\''s').

Implementation

String posixQuote(String s) => "'${s.replaceAll("'", "'\\''")}'";