def bat_to_sh(file_path):
sh_file = file_path[:-<NUM_LIT:4>] + '<STR_LIT>'<EOL>with open(file_path, '<STR_LIT:rb>') as inf, open(sh_file, '<STR_LIT:wb>') as outf:<EOL><INDENT>outf.write('<STR_LIT>')<EOL>for line in inf:<EOL><INDENT>if line.strip():<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>for line in inf:<EOL><INDENT>if line.startswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>modified_line = line.replace('<STR_LIT>', '<STR_LIT>').replace('<STR_LIT:\\>', '<STR_LIT:/>')<EOL>outf.write(modified_line)<EOL><DEDENT><DEDENT>print('<STR_LIT>' % sh_file)<EOL>st = os.stat(sh_file)<EOL>os.chmod(sh_file, st.st_mode | <NUM_LIT>)<EOL>return sh_file<EOL>
Convert honeybee .bat file to .sh file.

    WARNING: This is a very simple function and doesn't handle any edge cases.