Escape a string to be safely used in a single-quoted shell command.
Example:
const unsafe = "It's a test";const safe = escapePosixShSqe(unsafe);console.log(safe); // It'\''s a test Copy
const unsafe = "It's a test";const safe = escapePosixShSqe(unsafe);console.log(safe); // It'\''s a test
Escape a string to be safely used in a single-quoted shell command.
Example: