def bash_wrap(cmd_str):
 log.warning('bash_wrap() is deprecated and will be removed in v0.6.0')
 return ("bash -c '%s'" % cmd_str.replace("'", "'\\''"))

def bash_wrap ( cmd_str ) : log . warning ( 'bash_wrap() is deprecated and will be removed in v0.6.0' ) return ( "bash -c '%s'" % cmd_str . replace ( "'" , "'\\''" ) )
escape single quotes in a shell command string and wrap it with bash -c <string> .