Guest User

Untitled

a guest
Jun 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. shellEscape :: String -> String
  2. shellEscape "" = ""
  3. shellEscape ('\'' : cs) = '\'' : '\\' : '\'' : '\'' : shellEscape cs
  4. shellEscape (c : cs) = c : shellEscape cs
  5.  
  6. shellQuote :: String -> String
  7. shellQuote s = "'" ++ shellEscape s ++ "'"
Add Comment
Please, Sign In to add comment