s single-quoted for a POSIX shell (it's → 'it'\''s').
s
it's
'it'\''s'
String posixQuote(String s) => "'${s.replaceAll("'", "'\\''")}'";