From 98bfd8a66b0f59b0def6d4dc3f309e5eaab3c64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 16 Apr 1998 22:07:13 -0700 Subject: [PATCH] sh_quote added Rev: lib/modules/Process.pmod:1.18 --- lib/modules/Process.pmod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/modules/Process.pmod b/lib/modules/Process.pmod index 1cf7c5e34c..d66d2a1d84 100644 --- a/lib/modules/Process.pmod +++ b/lib/modules/Process.pmod @@ -25,6 +25,13 @@ int exec(string file,string ... foo) return 69; } +string sh_quote(string s) +{ + return replace(s, + ({"\\", "'", "\"", " "}), + ({"\\\\", "\\'", "\\\"","\\ "})); +} + string *split_quoted_string(string s) { s=replace(s, ({"\"","'","\\"," "}), ({"\0\"","\0'","\0\\","\0 "})); -- GitLab