def bash_string(s):
    """Wrap a string in double quotes and escape things inside."""
    s = s.replace('\\', '\\\\')  # \ -> \\
    s = s.replace('\"', '\\\"')  # " -> \"
    return '\"{}\"'.format(s)